;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Paradise ;;; ;;; Description: ;;; What is paradise? ;;; Relaxing on the beach? Nay, ;;; DeNero lecture. (define (draw) (define (angle b d) (if d b (- b 10))) (define (wave a b c d) (if (= a 700) nil (begin (pendown) (speed 0) (color "#00ccff") (pixelsize 10) (right b) (forward 10) (penup) (wave (+ a 1) (angle b d) "#117864" (if d #f #t))))) (define (waves h n) (if (= n 0) nil (begin (penup) (if (odd? n) (goto 400 h) (goto 350 h)) (seth -45) (wave 20 0 "#117864" #t) (waves (- h 60) (- n 1))))) (define (frond leaves) (if (= leaves 0) (end_fill) (begin (right -80) (forward 40) (left -90) (forward 45) (frond (- leaves 1))))) (define (coconut size) (color "#784832") (begin_fill) (circle size) (end_fill)) (bgcolor "blue") (waves 280 6) (penup) ;this is the island (goto -50 -70) (seth 0) (pendown) (color "#fdd8b5") (begin_fill) (circle 110 180) (goto -50 -70) (end_fill) ;make palm tree (penup) (goto -170 10) (seth 180) (pendown) (color "#646231") (begin_fill) (circle 400 -35) (seth 90) (forward 20) (seth 205) (circle 450 30) (end_fill) ;palm frawns (color "#74b560") (penup) (goto -100 230) (seth 250) ;leaf1 (begin_fill) (circle 700 -25) (frond 5) ;leaf2 (penup) (goto -85 235) (seth 300) (begin_fill) (circle 600 20) (left 110) (forward 50) (left 30) (frond 3) ;coconuts (penup) (goto -80 233) (coconut 12) (penup) (goto -125 237) (coconut 20) (penup) (goto -95 210) (coconut 9) ;continue with waves (waves -80 2) ;shark! (penup) (color "#34363a") (goto 200 -180) (begin_fill) (seth -20) (circle 150 40) (right 30) (circle 120 -42) (end_fill) ;continue with waves (waves -200 3) (ht) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)