# Main Command: Go # Oscilloscope 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 :a Make "T 0 SetPC Black PenDown For [S 0 360 8] [SetPos XYCurve :A :S :T For [T 0 360 4] [SetPC AngCol :T SetPos XYCurve :A :S :T] Refresh Wash] # put a wait in here if too fast end to xycurve :a :s :t Make "X 140*(Sin (90+:T)) Make "Y 140*(Cos ((:A*(:T))+:S))+24*Sin (:T) Output List :X :Y end to angcol :t Make "Green Round 127*(1+Cos(:T+90)) Output ( List 255 :Green 100 ) end to go New Animation For [A 2 4] [Spir :A] end