;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: ;;; ;;; Description: ;;; ;;; A toy with wheels and gears ;;; For drawing intricate shapes ;;; Made into a rainbow spiral (define (draw) (define (better_spiro bigR r p t start_x start_y end) (begin (let ((x (+ (* (- bigR r) (cos t)) (* p (cos(* ( / (- bigR r) r) t))) ) ) (y (- (* (- bigR r) (sin t)) (* p (sin(* ( / (- bigR r) r) t))) ) )) (setpos (+ start_x x) (+ start_y y))) (if (< t end) (begin (pd) (better_spiro bigR r p (+ t .01) start_x start_y end)) (pu) ) ) ) (define (spiro-spiral t r a end) (begin (let ((x (* t r (cos (* t a)))) (y (* t r (sin (* t a)))) ) (color (rgb (- 1 (/ t end)) (- 1 (/ t end)) (/ t end))) (better_spiro 96 80 16 0 x y 31.4) ) (if (< t end) (spiro-spiral (+ t 1) r a end) ) ) ) (spiro-spiral 1 3 .3 60) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)