;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: ;;; ;;; Description: ;;; (define (draw) ; YOUR CODE HERE (bgcolor "#000000") (speed 0) (color "#FFFFFF") ;(curve 45 1 45 4 130) (setheading 0) (penup) (setposition -600 250) (spiral-eye 0 77 1 350 0 -1 colors) (setposition -600 0) (spiral-eye 0 77 1 91 0 -1 colors3) (setposition -600 -250) (spiral-eye 0 77 1 340 0 -1 colors) (setposition 600 250) (spiral-eye 0 67 1 330 0 1 colors) (setposition 600 0) (spiral-eye 0 77 1 91 0 1 colors3) (setposition 600 -250) (spiral-eye 0 90 1 0 0 1 colors) (setposition -300 250) ;1 (spiral-eye 0 80 1 120 2 1 colors2) (setposition 0 250) ;2 (spiral-eye 0 89 1 180 0 1 colors) (setposition 300 250) ;3 (spiral-eye 0 80 1 87 0 1 colors2) (setposition -300 0) ;4 (spiral-eye 0 80 1 190 4 1 colors) (setposition 0 0) ;5 (spiral-eye 0 80 1 30 0 1 colors) (setposition 300 0) ;6 (spiral-eye 0 80 1 90 0 1 colors) (setposition -300 -250) ;7 (spiral-eye 0 80 1 135 0 1 colors2) (setposition 0 -250) ;8 (spiral-eye 0 80 1 150 0 1 colors) (setposition 300 -250) ;9 (spiral-eye 0 80 1 75 0 1 colors2) (hideturtle) (exitonclick)) (define colors (list "#FF0000" "#FF8000" "#CCCC00" "#009900" "#0080FF" "#0000FF" "#6600CC" "#FF00FF" "#808080")) (define colors2 (list "#FF0000" "#FF8000" "#FF3333" "#009900" "#0080FF" "#0000FF" "#6600CC" "#FF00FF" "#808080")) (define colors3 (list "#808080" "#909090" "#A0A0A0" "#B0B0B0" "#C0C0C0" "#D0D0D0" "#E0E0E0" "#F0F0F0" "#808080")) (define get-color (lambda (lst index) (if (null? lst) nil (if (zero? index) (car lst) (get-color (cdr lst) (- index 1)))) ) ) (define (spiral-eye start limit interval vary colornum neg colors) (if (> colornum 7) (define chosencolornum 0) (define chosencolornum colornum) ) (if (= 0 (modulo start 3)) (color (get-color colors chosencolornum)) (define chosencolornum (if (= chosencolornum 0) 7 (- chosencolornum 1)))) (cond ((<= start limit) (pendown) (forward start) (left (* 30 neg)) (forward start) (left (* vary neg)) (forward start) (left (* 60 neg)) (spiral-eye (+ start interval) limit interval vary (+ chosencolornum 1) neg colors)) (else (penup) (setheading 0)) ) ) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)