;;; arabesque.nlogo, cr 16 apr 2006 by rha on hypatia ;;; imitate john whitney sr pascal code globals [ mylist ] ;;;; defines new global variable "mylist" ;;;;;;;;;; dissection, 13 jan 2008 by g. craig hobbs ;;;;;;;;;; 3 buttons; setup, step. go ;;;;;;;;;; graphics window: 35 x 35 torus, origin at the center to setup ;;;;; begin procedure "setup" ca ;;;; Resets all global variables to zero set mylist n-values 360 [?] ;;;;; Set the variable "mylist" to a list of length 360 crt 360 ;;;;; create 360 turtles foreach mylist [ ;;;;;; for each turle in the list ask turtle ? [ ;;;;;; ask the agent called turtle set color red ;;;;; change the color to red set heading ? ;;;;; set direction forward 15 ;;;;; turle moves 15 steps ] ] end to step ;;;;; begin procedure "step" let stepsize 0.01 ;;;; defines local variable "stepsize" as 0.01 of a degree foreach mylist [ ;;;;; for each turtle in the list ask turtle ? [ ;;;;; ask the agent called turtle set heading 90 ;;;;; set heading to 90 degrees clockwise forward ? * stepsize ;;;;; move turtles forward times the stepsize ] ] end to go ;;;;; run program step ;;;;; step program end ;;; end: arabesque