PS5A: stacked sinusoidals    
     

 
// using real  sinusoidals, generate a shape
// with primarily convex properties.

#
g.pause(1200)
# a stacked sinusoidal
# first variable in g.line command determines slope origin
# pen has a decreasing value to emphasize stacked effect

import math
g.antialias(100)
g.norefresh()

for i in range(1, 100):
 g.pen(i)
 angle = (i / 51.0) * math.pi
 radius = i
 x = int(i + math.cos(angle)/radius)
 y = int(100 + math.sin(angle)*radius)
 g.line(i, 0, i, y)
 g.pen(50)
 g.line(80, 0, 1, y)
 g.pen (20)
 g.line(70, 0, 1, y)
 g.pen (10)
 g.line(50, 0, 1, y)
 g.refresh()