;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: ;;; ;;; Description: ;;; (define (draw) ; *YOUR CODE HERE* ; --- Reseting the position and orientation of cursor --- ; (define (reset) (setpos -150 100) (seth 0)) ; --- Drawing a ring --- ; (define (ring) (lambda () (circle 20 90) (rt 130) (circle 20 90) (rt 50) (circle 20 90) (rt 130) (circle 20 90) (rt 50) (circle 20 90) (lt 135) (fd 10) (lt 45) (fd 30) (lt 90) (fd 35) (rt 90) (fd 30) (lt 137) (fd 10))) ; --- fastest speed; pensize 3 --- ; ; note: implementation of pensize is in scheme_primitives.py ; (speed 0) (pensize 3) ; Blue ring --- top left ---; (penup) (reset) (pendown) (color '"#011489") (recurse 80 (ring)) (color '"#0e2be6") (recurse 60 (ring)) (color '"#4d65fb") (recurse 50 (ring)) (color '"#7e8ffc") (recurse 40 (ring)) ; Yellow ring -- bottom left (penup) (reset) (setpos 10 -200) (pendown) (color '"#dbd805") (recurse 80 (ring)) (color '"#efec09") (recurse 60 (ring)) (color '"#fcf902") (recurse 50 (ring)) (color '"#fffe88") (recurse 40 (ring)) ; Black ring -- top middle (penup) (reset) (setpos 170 100) (pendown) (color '"#000000") (recurse 80 (ring)) (color '"#424343") (recurse 60 (ring)) (color '"#6d6b6b") (recurse 50 (ring)) (color '"#88888b") (recurse 40 (ring)) ; Red ring -- top right (penup) (reset) (setpos 490 100) (pendown) (color '"#951616") (recurse 80 (ring)) (color '"#c52222") (recurse 60 (ring)) (color '"#f90909") (recurse 50 (ring)) (color '"#fb5454") (recurse 40 (ring)) ; green ring -- bottom right (penup) (reset) (setpos 330 -210) (pendown) (color '"#107f08") (recurse 80 (ring)) (color '"#14b208") (recurse 60 (ring)) (color '"#17ed07") (recurse 50 (ring)) (color '"#8dfa84") (recurse 40 (ring)) ) ; --- Recursive function --- ; (define (recurse x f) (cond ((> x 1) (begin (f) (recurse (- x 1) f))) (else (f)))) (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)