;; Mark Jacobson - CS 1025 09/03/2014 Octagons class followup TO Square Repeat 4 [ fd 2 rt 90 ] END TO Octagon ;; Square looks like this: Repeat 8 ;; TO Square [ ;; Repeat 4 fd 2 ;; [ rt 45 ;; fd 2 ] ;; rt 90 END ;; ] ;; END TO showSquaresAndOctagons ca ;; clear-all = erase all previous drawing ;; and remove all the turtles ;; not to be confused with Clairol, the shampoo cro howManyTurtles ask patches [ set pcolor white ] ask turtles [ fd 10 pd set pen-size 8 ;; so you can see the squares ;; 1st side underneath the octagons ;; 1st side drawn by each turtle. square set color black set pen-size 2 octagon pu bk 2 ;; bk 2 means back 2 steps pd bk 8 fd 8 ;; fd 8 means forward 8 steps pu fd 0.5 ] END