
radiant robed figure 3d model
# Figura radiosa vestita con braccia tese - Script Ruby per SketchUp # Esegui in SketchUp: Finestra > Console Ruby, quindi: carica "C:/path/to/radiant_figure_sketchup.rb" # Unità: centimetri. La figura è rivolta verso -Y (vista frontale), i raggi sono dietro di essa a +Y. modulo RadiantFigure modello = Sketchup.active_model modello.start_operation('Figura radiosa', true) radice = modello.active_entities.add_group radice.nome = 'Figura radiosa' def self.mat(modello, nome, rgb, alpha = 1.0) m = modello.materiali[nome] || model.materials.add(name) m.color = Sketchup::Color.new(*rgb) m.alpha = alpha m end # Superficie di rivoluzione attorno alla Z locale. profile = [[radius_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