;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Psychodelic Fern ;;; ;;; Description: ;;; Psychodelic fern ;;; Oh yea, so many colors ;;; Recursive rainbow! (define (sier d k i) (cond ((= i 1) (color 'red)) ((= i 2) (color 'orange)) ((= i 3) (color 'yellow)) ((= i 4) (color 'lightgreen)) ((= i 5) (color 'green)) ((= i 6) (color 'darkgreen)) ((= i 7) (color 'blue)) ((= i 8) (color 'purple)) ((= i 9) (color 'violet)) ((= i 10) (color 'pink)) ((= i 11) (color 'red)) ((= i 12) (color 'orange)) ((= i 13) (color 'yellow)) ((= i 14) (color 'lightgreen)) ((= i 15) (color 'green)) (else (color 'darkgreen))) (begin_fill) (circle d) (end_fill) (if (< k 1) (circle d) (alternate (/ d (/ 5 4)) k i))) (define (leg d k i) (penup) (lt 10) (fd (* d 3)) (pendown) (sier (* d (/ 8 9)) (- k 1) i)) (define (alternate d k i) (let ((x (xcor)) (y (ycor)) (head (heading))) (leg d k (+ i 1)) (seth head) (penup) (setpos x y) (bk d) (rt 90) (bk d) (pendown) (leg (/ d (/ 4 3)) (- k 1) (+ i 1)))) (define (draw) (speed 0) (penup) (bk 200) (pendown) (sier 80 15 1) (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)