;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Nuclear Eclipse ;;; ;;; Description: ;;; Tornado of fire, ;;; Rays of red yellow and orange, ;;; Power of turtles. (define hue (cons-stream 1 (cons-stream 2 (cons-stream 3 hue)))) (define c (cons-stream "red" (cons-stream "yellow" (cons-stream "red" c)))) (define (tornado ridges size angle c x) (if (zero? ridges) #t (begin (forward size) (right angle) (pendown) (cond ((= (car c) 1) (color (rgb 1 (/ (+ 0 x) 2) 0))) ((= (car c) 2) (color (rgb 1 (- 1 (/ x 2)) 0))) ((= (car c) 3) (color (rgb 1 (/ (+ 0.5 (/ x 2)) 1.5) 0)))) (begin_fill) (circle size) (end_fill) (penup) (tornado (- ridges 1) (* size 1.05) (* angle 0.99) (cdr-stream c) (+ x .01)) ) ) ) (define (cornerright) (right 90)) (define (corner) (begin_fill) (circle 300 90) (cornerright) (forward 1000) (cornerright) (forward 1300) (cornerright) (forward 1300) (cornerright) (forward 1000) (end_fill) (cornerright) (circle 300 90)) (define (four-corners x) (if (= x 0) #t (begin (corner) (four-corners (- x 1))))) (define (rays times clr thick) (if (= times 0) #t (begin (color clr) (circle 300 (/ 720 thick)) (cornerright) (begin_fill) (forward 1000) (cornerright) (circle -1300 (/ 360 thick)) (cornerright) (forward 1000) (cornerright) (circle 300 (/ 360 thick)) (end_fill) (rays (- times 1) clr thick)))) (define (draw) ; YOUR CODE HERE (showturtle) (bgcolor "orange") (speed 10) (tornado 50 40 210 hue 0) (setposition 0 300) (setheading 270) (color "white") (pendown) (four-corners 4) (rays 7 (rgb 1 0.5 0) 100) (rays 17 (rgb 1 0.75 0) 100) (rays 19 (rgb 1 0.25 0) 100) (rays 7 (rgb 1 0.5 0) 100) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)