# File Geodesic_SketchUp.rb, line 147 def self.expand_face( face, frequency, radius, entities ) if frequency < 1 entities.add_face( face.collect{ |v| v.normalize.scale_by( radius ).to_point3d } ) else a,b,c = face ab = a + (b-a).scale_by( 0.5 ) ac = a + (c-a).scale_by( 0.5 ) bc = b + (c-b).scale_by( 0.5 ) [ [ a, ab, ac ], [ b, bc, ab ], [ c, ac, bc ], [ ab, bc, ac ] ].each{ |f| self.expand_face( f, frequency-1, radius, entities ) } end end