# Main Command: Go 3 # Grate Curve by Guy Walker # www.logoarts.co.uk to new # set default screen, pen and turtle ResetAll SetScreenSize [400 400] HideTurtle SetSC Black SetPC Green SetPS 1 PenUp end to square :angle :width :height Forward :Width Two :Angle :Width :Height-1 end to two :angle :width :height If :Height < 1 [Stop] # ie if = 0 Right :Angle Forward 1 Right :Angle Forward :Width Left :Angle If :Height > 0 [ Forward 1] Left :Angle Forward :Width Two :Angle :Width :Height -2 end to grate :order :angle :width :height If :Order < 1 [Square :Angle :Width :Height Stop] # ie if = 0 Right :Angle Grate :Order-1 Minus :Angle :Height/4 :Width Forward :Height/8 Grate :Order-1 :Angle :Height/4 :Width Forward :Height/8 Grate :Order-1 Minus :Angle :Height/4 :Width Left :Angle end to go :order New SetPos [-192 -190] SetPC Brown PenDown Grate :Order 90 380 380 end