;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Fibonachu ;;; ;;; Description: ;;; Fibonachu is ;;; Surprised when you optimize ;;; Scheme tail recursion (define (ear-fxn x) (begin_fill) (fd (* x 100)) (rt 16) (fd (* x 3)) (rt 16) (fd (* x 3)) (rt 16) (fd (* x 3)) (rt 16) (fd (* x 3)) (rt 16) (fd (* x 3)) (rt 16) (fd (* x 3)) (rt 16) (fd (* x 3)) (rt 16) (fd (* x 3)) (rt 16) (fd (* x 3)) (rt 14) (fd (* x 3)) (fd (* x 65)) (rt 85) (fd (* x 10)) (lt 18) (fd (* x 52)) (end_fill) ;(pu) (bk (* x 52)) (rt 20) (bk (* x 10)) (rt 83) (rt 180)) ;(pd) (define (draw-pika x) ;assume pointing straight up, will end pointing straight up (begin_fill) (rt 15) (pd) (fd (* x 50)) (lt 35) (fd (* x 75)) (rt 35) (fd (* x 200)) (rt 15) (fd (* x 15)) (pu) (bk (* x 15)) (lt 15) (pd) (lt 50) (fd (* x 120)) (rt 5) (rt 40) (fd (* x 52)) (rt 20) (fd (* x 10)) (rt 100) ;(ear-fxn x) (lt 7) (fd (* x 190)) (lt 35) (fd (* x 200)) (lt 24) (fd (* x 200)) (rt 120) (fd (* x 50)) (rt 10) (fd (* x 50)) (rt 30) (fd (* x 100)) (rt 90) (fd (* x 15)) (pu) (bk (* x 15)) (lt 90) (pd) (lt 58) (fd (* x 170)) (rt 2) (fd (* x 129)) (rt 102) (fd (* x 506)) (color "#f4df42") (end_fill) (color "black") (rt 90) (rt 15) (pd) (fd (* x 50)) (lt 35) (fd (* x 75)) (rt 34) (fd (* x 35)) (pu) (rt 90) (fd (* x 210)) (begin_fill) (lt 14) ;(fd (* x 8)) (pd) (fd (* x 35)) (lt 12) (fd (* x 3)) (lt 11) (fd (* x 3)) (lt 12) (fd (* x 3)) (lt 11) (fd (* x 3)) (lt 12) (fd (* x 3)) (lt 11) (fd (* x 3)) (lt 12) (fd (* x 3)) (lt 5) (fd (* x 30)) (lt 15) (fd (* x 5)) (lt 15) (fd (* x 5)) (lt 16) (fd (* x 5)) (lt 15) (fd (* x 5)) (lt 16) (fd (* x 5)) (lt 15) (fd (* x 5)) (fd (* x 30)) (lt 20) (fd (* x 11)) (lt 20) (fd (* x 11)) (lt 19) (fd (* x 12)) (lt 19) (fd (* x 11)) (lt 20) (fd (* x 10)) (lt 19) (fd (* x 10)) (lt 20) (fd (* x 11)) (lt 21) (fd (* x 11)) (lt 21) (fd (* x 7)) (color "#eb8e70") (end_fill) (color "black") (pu) (bk (* x 7)) (rt 21) (bk (* x 11)) (rt 21) (bk (* x 11)) (rt 20) (bk (* x 10)) (rt 19) (bk (* x 10)) (rt 20) (bk (* x 11)) (rt 19) (bk (* x 12)) (rt 19) (bk (* x 11)) (rt 20) (bk (* x 11)) (rt 20) (bk (* x 30)) (bk (* x 5)) (rt 15) (bk (* x 5)) (rt 16) (bk (* x 5)) (rt 15) (bk (* x 5)) (rt 16) (bk (* x 5)) (rt 15) (bk (* x 5)) (rt 15) (bk (* x 30)) (rt 5) (bk (* x 3)) (rt 12) (bk (* x 3)) (rt 11) (bk (* x 3)) (rt 12) (bk (* x 3)) (rt 11) (bk (* x 3)) (rt 12) (bk (* x 3)) (rt 11) (bk (* x 3)) (rt 12) (bk (* x 35)) ;(bk (* x 8)) (rt 14) (bk (* x 210)) (lt 90) (fd (* x 5)) (pu) (rt 120) (fd (* x 21)) (pd) (begin_fill) (circle (* x 33)) (color "#f76b2a") (end_fill) (pu) (bk (* x 21)) (lt 119) (color "black") (fd (* x 93)) (fd (* x 2)) (rt 90) (fd (* x 80)) (pd) (begin_fill) (circle (* x 25)) (end_fill) (pu) (bk (* x 80)) (lt 90) (fd (* x 25)) (rt 90) (fd (* x 65)) (pd) (begin_fill) (circle (* x 7)) (color "white") (end_fill) (color "black") (pu) (bk (* x 65)) (lt 90) (fd (* x 40)) (rt 15) (fd (* x 15)) (bk (* x 15)) (lt 15) (pd) (lt 50) (fd (* x 120)) (ear-fxn x) (pu) (fd (* x 190)) (rt 60) (fd (* x 185)) (pd) (begin_fill) (lt 70) (fd (* x 20)) (lt 30) (fd (* x 20)) (lt 164) (fd (* x 39)) (end_fill) (pu) (bk (* x 70)) (rt 170) (fd (* x 80)) (pd) (begin_fill) (circle (* x 25)) (end_fill) (lt 95) (pu) (fd (* x 39)) (pd) (begin_fill) (circle (* x 7)) (color "white") (end_fill) (pu) (bk (* x 170)) (rt 80) (fd (* x 60)) (pd) (begin_fill) (color "black") (circle (* x 33)) (color "#f76b2a") (end_fill) (pu) (color "black") (bk (* x 300)) (lt 155) (fd (* x 150)) (rt 90) (fd (* x 5)) (rt 90) (fd (* 506 x)) (lt 90) (bk (* x 9)) ) (define (fib scale) (if (> scale .005) ((draw-pika scale) (rt 26) (fib (* scale .82))) ((ht)) )) (define (circ n m x) (define degree (* n (quotient 360 m)))) (define (draw) (pu) (goto -275 145) (pd) (speed 0) (fib .36) (ht) (exitonclick) ) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)