;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Rainbow Sign ~ Rainbow Wind Chime ;;; ;;; Description: ;;; Colorful bullets ;;; Dodging them all is a chore ;;; The Touhou Project (define (shot clr) (pd) (left 135) (color clr) (begin_fill) (circle 10 90) (left 90) (circle 10 90) (end_fill) (right 45) (pu) ) (define (amulet clr) (color clr) (begin_fill) (right 90) (fd 5) (left 90) (fd 15) (left 90) (fd 10) (left 90) (fd 15) (left 90) (fd 5) (left 90) (end_fill) ) (define (spiral dist num step ang type clr) (if (> num 0) (begin (pu) (fd dist) (type clr) (bk dist) (left ang) (spiral (+ dist step) (- num 1) step ang type clr) )) ) (define (repeat action num) (if (> num 0) (begin (action) (repeat action (- num 1)) )) ) (define (rainbow_wind_chime dist step clr_list) (if (null? clr_list) nil (begin (repeat (lambda () (spiral dist 25 step 6 shot (car clr_list)) (right 90)) 6) (right 10) (rainbow_wind_chime dist step (cdr clr_list)) ) ) ) (define (drawchar clr) ; Draw the character's head (seth 90) (pd) (color "#ffff99") (begin_fill) (circle 5) (end_fill) ; Draw the character's body (angles calculated for a trapezoid) (color clr) (begin_fill) (fd 3) (right 78.69) (fd 10.198) (right 101.31) (fd 10) (right 101.31) (fd 10.198) (right 78.69) (fd 3) (end_fill) ) (define (meiling) (drawchar "#009900") ; Draw a hat. Keep the color from drawchar (left 90) (pu) (fd 8) (right 90) (begin_fill) (fd 5) (left 90) (fd 5) (left 90) (fd 10) (end_fill) ) (define (draw) ; *YOUR CODE HERE* (speed 0) (goto 500 300) (begin_fill) (goto -500 300) (goto -500 -300) (goto 500 -300) (end_fill) (goto 75 -175) (drawchar "#ff0033") (left 67) (repeat (lambda () (spiral 20 20 30 0 amulet "#cc3300") (left 14)) 4) (goto 0 100) (rainbow_wind_chime 30 20 (list "red" "orange" "yellow" "green" "blue" "purple")) (meiling) (hideturtle) (exitonclick)) ; 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)