;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Magic Circle ;;; ;;; Description: ;;; The ancient tale said that once you put your hands on this circle, ;;; your dream will come true. ;;; Well, I'm just kidding. TBH, I am a big fan of Fullmetal Alchemist. (define (five-side l times) (cond ((= times 0) '()) (else (begin (pendown) (begin_fill) (repeat-five-side l 36 5) (if (= (modulo times 3) 0) (color "#FFEFD5")) (if (= (modulo times 3) 1) (color "#D2691E")) (if (= (modulo times 3) 2) (color "#7CFC00")) (end_fill) (color "black") (if (= (modulo times 3) 0) (let ((r (* (/ l 2) 1.37638192047))) (lt 72) (fd (/ l 2)) (begin_fill) (circle r) (color "#87CEEB") (end_fill) (color "black") (bk (/ l 2)) (rt 72))) (penup) (bk (/ l 2)) (let ((l (* 2 (* 0.80901699437 (/ l 2))))) (five-side l (- times 1))) ))))) (define (repeat-five-side l deg step) (cond ((= step 0) '()) (else (begin (lt deg) (fd l) (repeat-five-side l 72 (- step 1))) ))) (define (repeat-center-vertex l times) (cond ((< times 0) '()) (else (begin (color "black") (lt 126) (fd l) (rt 108)(fd l)(lt 54) (repeat-center-vertex l (- times 1))) ))) (define (four-leaves r i) (cond ((= i 0) '()) (else (begin (color "black") (begin_fill) (circle r 90) (if (= (modulo i 2) 0) (lt 90) (rt 225)) (color "#00E0D0") (end_fill) (four-leaves r (- i 1)) )))) (define (draw) (speed 10) (penup) (goto 250 0) (pendown) (begin_fill) (circle 250) (color "red") (end_fill) (penup) (goto 240 0) (pendown) (color "black") (begin_fill) (circle 240) (color "#FFFACD") (end_fill) (penup) (define l (* 240 0.58778525229 2)) (goto 0 0) (seth 0) (pendown) (four-leaves (* (/ l 2) 1.41421356237) 16) (penup) (goto 0 240) (lt 90) (color "black") (five-side l 21) (penup) (define l 240) (goto 0 240) (seth 306) (pendown) (repeat-center-vertex l 3) (penup) (define l (* 240 0.80901699437)) (goto 0 (- l)) (seth 126) (pendown) (repeat-center-vertex l 3) (ht) (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)