;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: A Cal student's BFF ;;; ;;; Description: ;;; (define body_color (rgb 0.14 0.18 0.23)) (define white (rgb 1 1 1)) (define pink (rgb 0.87 0.04 0.2)) (define wheel_color (rgb 0.14 0.18 0.22)) (define (heart colr x y n) (color pink) (penup) (goto x y) (pendown) (begin_fill) (right 45) (forward n) (left 45) (circle (/ (* (/ n 2) (sqrt 2)) 2) 180) (left 180) (circle (/ (* (/ n 2) (sqrt 2)) 2) 180) (left 45) (forward n) (left 135) (end_fill) ) (define (rect colr x y width height) (color colr) (penup) (goto x y) (pendown) (begin_fill) (goto (+ x width) y) (goto (+ x width) (- y height)) (goto x (- y height)) (goto x y) (end_fill) ) (define (inner_body x y) (color body_color) (penup) (rect body_color (+ x 25) (+ y 0) 70 90) (rect body_color (+ x 10) (+ y 0) 100 75) (begin_fill) (goto (+ x 110) (+ y -75)) (circle 15) (goto (+ x 40) (+ y -75)) (circle 15) (end_fill) ) (define (screen x y) (rect (rgb 0.09 0.13 0.12) (+ x 25) (+ y -20) 70 45) (rect white (+ x 30) (+ y -25) 60 35) ) (define (round_rect colr x y width length r) (color colr) (penup) (goto x y) (rect colr (+ x r) y (- width (* 2 r)) length) (rect colr x (- y r) width (- length (* 2 r))) (goto (+ x (* 2 r)) (- y r)) (begin_fill) (circle r) (goto (+ x width) (- y r)) (circle r) (goto (+ x width) (- y (- length r))) (circle r) (goto (+ x (* 2 r)) (- y (- length r))) (circle r) (end_fill) ) (define base_color (rgb 0.13 0.13 0.18)) (define (base x y) (rect base_color (+ x 5) (+ y -150) 110 5) (round_rect base_color (+ x 40) (+ y -100) 40 60 10) (round_rect wheel_color (+ x 20) (+ y -100) 80 45 10) (round_rect base_color (+ x 5) (+ y -100) 110 40 10) ) (define (kiwi x y) (base x y) (round_rect white (+ x 0) (+ y 0) 120 130 10) (inner_body x y) (screen x y) (round_rect wheel_color (+ x 105) (+ y -130) 30 40 5) (round_rect wheel_color (+ x -15) (+ y -130) 30 40 5) (heart pink (+ x 45) (+ y -50) 10) (heart pink (+ x 75) (+ y -50) 10) ) (define (kiwi2 x y) (base x y) (round_rect white (+ x 0) (+ y 0) 120 130 10) (inner_body x y) (screen x y) (round_rect wheel_color (+ x 105) (+ y -130) 30 40 5) (round_rect wheel_color (+ x -15) (+ y -130) 30 40 5) (round_rect (rgb 0.06 0.42 0.94) (+ x 40) (+ y -40) 10 10 2) (round_rect (rgb 0.06 0.42 0.94) (+ x 70) (+ y -40) 10 10 2) ) (define (draw) (bgcolor (rgb 0.12 0.7 0.98)) (kiwi 0 0) (kiwi2 -200 0) (hideturtle) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)