#lang racket
(require gigls/unsafe)

; A quick experiment with spirals.  Try
;  (for-each (l-s action! tommy) (iota 400))

(define world (image-show (image-new 200 200)))
(define tommy (turtle-new world))
(turtle-teleport! tommy (/ (image-width world) 2) (/ (image-height world) 2))
(turtle-set-brush! tommy "2. Hardness 075" 10)

(define action!
  (lambda (t n)
    (turtle-forward! t 10)
    (turtle-turn! t n)
    (let ([component (* 35 (mod n 7))])
      (turtle-set-color! t (irgb component component component)))))
 
