;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Golden Rectios ;;; ;;; Description: ;;; Golden Ratio ;;; controls all these rectangles ;;; makes them spin in scale.> (define (draw) ; *YOUR CODE HERE* ; via Google Calculator (define golden-ratio 1.61803398875) (define (rect longer short) (forward longer) (rt 90) (forward short) (rt 90) (forward longer) (rt 90) (forward short) (rt 90) ) (define (main shorter-side k) (cond ((> k 0) (define longer-side (* shorter-side golden-ratio)) (rect longer-side shorter-side) (forward longer-side) (rt 90) (main longer-side (- k 1)) ) ) ) ; first number (default 6) is the initial length of the shorter side ; the longer side will be calculated using golden-ratio ; the second number (default 8) is the number of rectangles drawn (main 6 8) (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)