class IRB::RubyModel
def init_ruby_model
def init_ruby_model cap_vertices = (0..5).map {|i| Vec.new(*Complex.polar(1, i * Math::PI / 3).rect, 1) } middle_vertices = (0..5).map {|i| Vec.new(*Complex.polar(2, (i + 0.5) * Math::PI / 3).rect, 0) } bottom_vertex = Vec.new(0, 0, -2) faces = [cap_vertices] 6.times do |j| i = j-1 faces << [cap_vertices[i], middle_vertices[i], cap_vertices[j]] faces << [cap_vertices[j], middle_vertices[i], middle_vertices[j]] faces << [middle_vertices[i], bottom_vertex, middle_vertices[j]] end faces end