;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Snowflake Tree in Spiral ;;; ;;; Description: ;;; (define (draw) (define (draw_snowflake size) (penup) (forward (* 10 size)) (left 45) (pendown) (color "white") (define (draw_branch size times) (cond ((= times 0) 0) (else (branch size) (left 45) (draw_branch size (- times 1)) ) ) ) (draw_branch size 7) (branch size) (backward (* 10 size)) ) (define (branch size) (define (loop1 size) (forward (/ (* 10 size) 3)) (backward (/ (* 10 size) 3)) (right 45) ) (define (loop2 size) (loop1 size) (loop1 size) (loop1 size) (left 90) (backward (/ (* 10 size) 3)) (left 45) ) (loop2 size) (loop2 size) (loop2 size) (right 90) (forward (* 10 size)) ) (penup) (setposition 300 0) (setheading 0) (speed 10) (pendown) (bgcolor "black") (define (draw_fill size) (begin_fill) (forward size) (right 90) (forward (/ size 20)) (right 90) (forward size) (right 90) (forward (/ size 20)) (right 90) (end_fill) ) (define (draw_crazy_tree levels size) (cond ((= levels 0) (draw_snowflake 0.8)) ((= levels 1) (draw_fill size) (forward size) (draw_crazy_tree (- levels 1) (* 0.75 size)) (color "antique white") (backward size)) (else (draw_fill size) (forward size) (left 55) (draw_crazy_tree (- levels 1) (* 0.75 size)) (right 65) (draw_crazy_tree (- levels 1) (* 0.75 size)) (right 25) (draw_crazy_tree (- levels 1) (* 0.75 size)) (left 35) (backward size) ) ) ) (penup) (setposition 0 -200) (setheading 0) (speed 10) (pendown) (color "antique white") (draw_crazy_tree 5 150) (define (draw_vortex size degree times) (cond ((= times 0) 0) (else (pendown) (circle size degree) (penup) (circle size degree) (draw_vortex size degree (- times 1)) ) ) ) (define (vortex size degree times) (draw_vortex size degree times) (penup) (setposition (- size 20) 0) (pendown) ) (penup) (setposition 340 0) (setheading 0) (speed 10) (pendown) (color "RoyalBlue") (vortex 340 15 12) (color "RoyalBlue1") (vortex 320 20 9) (color "RoyalBlue2") (vortex 300 12 15) (color "RoyalBlue3") (vortex 280 10 18) (color "RoyalBlue3") (vortex 260 15 12) (color "RoyalBlue4") (vortex 240 18 10) (color "RoyalBlue4") (vortex 220 20 9) (color "blue") (vortex 200 9 20) (color "blue1") (vortex 180 10 18) (color "blue1") (vortex 160 9 20) (color "blue2") (vortex 140 12 15) (color "blue2") (vortex 120 15 12) (color "blue3") (vortex 100 18 10) (color "blue3") (vortex 80 36 5) (color "blue4") (vortex 60 10 18) (color "blue4") (vortex 40 18 10) (color "dark blue") (vortex 20 5 36) (penup) (setposition 10 0) (pendown) (color "dark blue") (draw_vortex 10 15 12) (penup) (setposition 5 0) (pendown) (color "dark blue") (draw_vortex 5 12 15) (penup) (setposition 290 0) (setheading 0) (speed 10) (pendown) (color "LightYellow") (draw_vortex 290 12 15) (penup) (setposition 210 0) (pendown) (color "LightYellow1") (draw_vortex 210 10 18) (penup) (setposition 150 0) (pendown) (color "LightYellow2") (draw_vortex 150 15 12) (penup) (setposition 90 0) (pendown) (color "LightYellow3") (draw_vortex 90 18 10) (penup) (setposition 30 0) (pendown) (color "LightYellow4") (draw_vortex 30 20 9) (penup) (setposition 230 0) (setheading 0) (speed 10) (pendown) (color "PaleGreen2") (draw_vortex 230 9 20) (penup) (setposition 170 0) (pendown) (color "PaleGreen3") (draw_vortex 170 10 18) (penup) (setposition 110 0) (pendown) (color "PaleGreen4") (draw_vortex 110 9 20) (penup) (setposition 330 0) (setheading 0) (speed 10) (pendown) (color "purple3") (draw_vortex 330 9 20) (penup) (setposition 250 0) (pendown) (color "purple3") (draw_vortex 250 9 20) (penup) (setposition 70 0) (pendown) (color "purple4") (draw_vortex 70 10 18) (hideturtle) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)