(define (repeater n) (frame 0 1 (* 15 n)) (if (= 2 n) nil (repeater (- n 1)) ) ) (define (frame theta bool a) (define r1 (+ 1 (* 0.9 (cos (* 8 theta) ) ) )) (define r2 (+ 1 (* 0.1 (cos (* 24 theta) )))) (define r3 (+ 0.9 (* 0.1 (cos (* 200 theta))))) (define r4 (+ 1 (sin theta))) (define r (* a r1 r2 r3 r4)) (define x (* r (cos theta))) (define y (* r (sin theta))) (speed 0) (if (= theta 0) (penup) (pendown) ) (if (= bool 1) (begin (cond ((= a 105) (color "#80f015")) ((= a 90) (color "#509010")) ((= a 75) (color "#406505")) ((= a 60) (color "#305000")) ((= a 45) (color "#253800")) ((= a 30) (color "#253000")) ) (setpos x (- y 150)) ) (begin (cond ((= a 105) (color "#80f015")) ((= a 90) (color "#509010")) ((= a 75) (color "#406505")) ((= a 60) (color "#305000")) ((= a 45) (color "#253800")) ((= a 30) (color "#253000")) ) (setpos x (- y 150)) (setpos 0 -150) ) ) (if (> theta 6.3) (if (= bool 1) (frame 0 0 a) (begin nil (bgcolor "black") ) ) (if (= bool 1) (frame (+ theta 0.01) bool a) (frame (+ theta 0.015) bool a) ) ) ) ; (define (frame theta) ; (define r1 (+ 1 (* 0.9 (cos (* 8 theta) ) ) )) ; (define r2 (+ 1 (* 0.1 (cos (* 24 theta) )))) ; (define r3 (+ 0.9 (* 0.1 (cos (* 200 theta))))) ; (define r4 (+ 1 (sin theta))) ; (define r (* 100 r1 r2 r3 r4)) ; (define x (* r (cos theta))) ; (define y (* r (sin theta))) ; (speed 0) ; (if (= theta 0) ; (penup) ; (pendown) ; ) ; (rgb 0.2 0.8 0.1) ; (setpos x (- y 160)) ; ; (setpos 0 -160) ; (if (> theta 6.3) ; nil ; (frame (+ theta 0.01)) ; ) ; )