
radiant robed figure 3d model
# 发光长袍人物,双臂伸展 - SketchUp Ruby 脚本 # 在 SketchUp 中运行:窗口 > Ruby 控制台,然后: load "C:/path/to/radiant_figure_sketchup.rb" # 单位:厘米。人物面向 -Y(前视图),光线位于其后方的 +Y 处。 module RadiantFigure model = Sketchup.active_model model.start_operation('Radiant Figure', true) root = model.active_entities.add_group root.name = 'Radiant Figure' def self.mat(model, name, rgb, alpha = 1.0) m = model.materials[name] || model.materials.add(name) m.color = Sketchup::Color.new(*rgb) m.alpha = alpha m end # 绕局部 Z 轴旋转的旋转面。轮廓 = [[半径_cm, z_cm], ...] def self.lathe(parent, profile, seg = 32, name = 'part') g = parent.entities.add_group g.name = name mesh = Geom::PolygonMesh.new rings = profile.map do |r, z| (0...seg).map do |j| a = 2 * Math::PI * j / seg Geom::Point3d.new((r * Math.cos(a)).cm, (r * Math.sin(a)).cm, z.cm) end
4K·PBR·Tripo H3.1