;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Lollipop ;;; ;;; Description: ;;; (define (center) (penup) (setpos 0 100) (pendown)) (define (draw) (color "#CCC66C") (size 10) (sety -300) (sety 100) (whirl 0 0) (glaze 0) (exitonclick) ) (define (whirl angle c) (cond ((< angle 375) (center) (cond ((zero? (modulo c 4)) (color "#AF1134")) ((zero? (modulo (+ c 1) 4)) (color "#EAB22B")) ((zero? (modulo (+ c 2) 4)) (color "#48851D")) (else (color "#406EBB")) ) (spiral 1 angle 1) (whirl (+ angle 15) (+ c 1)) ) ) ) (define (glaze angle) (cond ((< angle 390) (center) (spiral 1 angle 0) (glaze (+ angle 45)) ) ) ) (define (spiral distance ang colored) (seth ang) (cond ((>= distance 7)) ((eq? colored 1) (size (* distance 3.75)) (forward distance) (spiral (+ distance 0.1) (+ ang 3) 1 ) ) ((zero? colored) (color "#FFFFFF") (size 7) (forward distance) (spiral (+ distance 0.1) (+ ang 2) 0 ) ) ) ) ; Please leave this last line alone. You may add additional procedures above ; this line. All Scheme tokens in this file (including the one below) count ; toward the token limit. (draw)