;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: A Study In Chrome ;;; ;;; Description: ;;; My mind spins in Scheme ;;; Recursion rewards itself ;;; with more recursion? (define percentlen .90) (define twistspd -10) (define (draw) (define (drawspine len bearing velocity) ;take a parentflame and draw its child (cond ((< len 10) (begin (fd len) (end_fill) (pu)) ) (else (begin (setheading bearing) (fd len) (end_fill) (begin_fill) (bk (* .8 len))) (drawspine (* percentlen len) (+ bearing twistspd) velocity) ) ) ) (define (helper bearing counter r g b) (pd) (color (rgb r g b)) (drawspine 200 bearing 0) (goto 0 0) (cond ((= counter 0) nil) ((< (modulo counter 6) 2) (helper (+ bearing 59) (- counter 1) (- 1 (/ counter 80)) 0 0)) ((< (- (modulo counter 6) 2) 2) (helper (+ bearing 59) (- counter 1) 0 (- 1 (/ counter 80)) 0)) ((< (- (modulo counter 6) 4) 2) (helper (+ bearing 59) (- counter 1) (- 1 (/ counter 80)) (- 1 (/ counter 80)) 0)) ) ) (bgcolor (rgb 0 0 0)) (speed 10) (helper 0 60 0.25 0 0) (begin (goto 0 120) (setheading 270) (color (rgb 1 1 1)) (begin_fill) (circle 120) (end_fill)) (begin (goto 0 100) (setheading 270) (color (rgb 0 0 1)) (begin_fill) (circle 100) (end_fill)) (exitonclick) ) (draw)