;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Stars ;;; ;;; Description: ;;; What if bright starlight ;;; were to spiral out of sight, ;;; beyond the bleak night? (define (draw) (spirals "yellow" star angle 5 108) (exitonclick)) (define (spirals col shape angle arms total) (define (make-arms count) (if (<= count arms) (begin (make-spiral 1) (goto 0 0) (seth (* (/ count arms) 360)) (make-arms (+ count 1))))) (define (make-spiral size) (if (<= size total) (begin (fd (/ size 2)) (shape (/ size 2)) (fd (/ size 2)) (lt (angle size)) (make-spiral (+ size 1))))) (begin (st) (speed 0) (pu) (color col) (make-arms 1) (ht))) (define (star d) (begin (fd (* d cot36)) (lt 162) (pd) (begin_fill) (repeat 5 (lambda () (begin (fd d) (rt 72) (fd d) (lt 144)))) (pu) (rt 162) (bk (* d cot36)) (end_fill))) (define (repeat k fn) (if (> k 0) (begin (fn) (repeat (- k 1) fn)) 'done)) (define cot36 1.37638) (define (angle theta) (- 18 (/ theta 6))) ; 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)