;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: ;;; ;;; Description: ;;; (define (draw) (bgcolor (rgb 0 0 0)) (speed 10) (penup) ; (setposition (- (screen_width)) (screen_height)) (setposition -250 250) (pendown) (rt 90) (define (drawSky count r b) (if (> count 0) (begin (color (rgb (/ r 255) 0 (/ b 255))) (begin_fill) (fd 500) ; turn around from the right (right 90) (forward 12) (right 90) (fd 500) (end_fill) ; turn around from the left (left 90) (forward 1) (left 90) (drawSky (- count 1) (+ r 6) b)) )) (drawSky 30 0 120) (define (drawMoon) (penup) (setposition -45 100) (color (rgb (/ 230 255) 1 1)) (begin_fill) (circle 35) (end_fill) ) (drawMoon) (define randomX (list 2 76 -194 -119 153 -30 215 -3 -89 -12 158 21 104 -182 -173 -231 198 -113 16)) (define randomY (list 239 169 48 185 238 19 97 -121 173 135 3 247 63 157 137 198 189 155 145)) (define randomSize (list 2 4 2 3 4 3 2 3 5 2 2 2 3 3 3 4 3 4 2)) (define (drawStars count xCor yCor size) (penup) (if (> count 0) (begin (setposition (car xCor) (car yCor)) (begin_fill) (circle (car size)) (end_fill) (drawStars (- count 1) (cdr xCor) (cdr yCor) (cdr size)))) ) (drawStars 19 randomX randomY randomSize) (define randX (list -190 158 -128 -120)) (define randY (list 200 110 205 113)) (define randAdd (list 20 8 -10 -5 8 )) (define randAdd1 (list -10 -2 -5)) (define (drawClouds count x y dist) (define (drawCloudsBottom dst i xx yy distAdd) (if (> i 0) (begin (setposition xx yy) (color (rgb (/ 38 255) (/ 38 255) (/ 115 255))) (begin_fill) (fd dst) (right 90) (forward 6) (right 90) (fd dst) (end_fill) (left 90) (forward 4) (left 90) (drawCloudsBottom (+ dst (car distAdd)) (- i 1) (+ xx 3) (+ yy 3) (cdr distAdd)) ))) (define (drawCloudsTop dst i xx yy distAdd) (if (> i 0) (begin (setposition xx yy) (color (rgb (/ 45 255) (/ 45 255) (/ 134 255))) (begin_fill) (fd dst) (right 90) (forward 7) (right 90) (fd dst) (end_fill) (left 90) (forward 1) (left 90) (drawCloudsTop (+ dst (car distAdd)) (- i 1) (+ xx 3) (+ yy 3) (cdr distAdd)) ))) (if (> count 0) (begin (drawCloudsBottom 100 5 (car x) (car y) randAdd) (drawCloudsTop 80 3 (+ (car x) 9) (+ (car y) 18) randAdd1) (drawClouds (- count 1) (cdr x) (cdr y) 50) ))) (drawClouds 4 randX randY 50) (define (drawHill count size r x y) (if (> count 0) (begin (color (rgb (/ r 255) (/ 102 255) 1)) (setposition x y) (begin_fill) (circle size) (end_fill) (drawHill (- count 1) (- size 30) (- r 20) (+ x 1.2) (+ y 30)) )) ) (drawHill 4 160 120 -140 -350) (drawHill 4 160 120 250 -360) (drawHill 4 160 120 10 -340) (setposition -280 0) (color (rgb 0 0 0)) (begin_fill) (rt 90) (fd 300) (rt 90) (fd 200) (end_fill) (setposition -300 -150) (begin_fill) (rt 180) (fd 600) (rt 90) (fd 200) (rt 90) (fd 600) (end_fill) (setposition 280 100) (color (rgb 0 0 0)) (begin_fill) (left 90) (fd 500) (left 90) (fd 200) (left 90) (fd 500) (end_fill) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)