Paste Into Ruby Console

for j in 0...100
  t = 2*Math::PI*j/100
  x = 16*Math.sin(t)**3
  y = 13*Math.cos(t) - 5*Math.cos(2*t) - 2*Math.cos(3*t) - Math.cos(4*t)
  pt1 = [x,y,0]
  t = 2*Math::PI*(j+1)/100
  x = 16*Math.sin(t)**3
  y = 13*Math.cos(t) - 5*Math.cos(2*t) - 2*Math.cos(3*t) - Math.cos(4*t)
  pt2 = [x,y,0]
  Sketchup.active_model.entities.add_line(pt1,pt2)
end
5 Likes