# Main Command: Go # SpiroCircle 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 spir For [R 0 180 4] [ Make "S (180-:R) Make "Theta 0 PenUp SetPos XYCurve :R :Theta PenDown For [Theta 2 360 2] [SetPos XYCurve :R :Theta] Refresh Wash] # put a wait in here if too fast end to init Make "A (1 + Random 7) Make "B (1 + Random 5) Make "W Minus :W end to xycurve :r :theta Make "RotA :A*:Theta Make "RotB :B*:Theta Make "X :R*(Sin :RotA) + :S*(Cos :RotB)*:W Make "Y :R*(Cos :RotA) + :S*(Sin :RotB) Output (List :X :Y) end to go New Animation Make "W 1 Forever [Init SetPC :A Spir] end