;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Family Dinner ;;; ;;; Description: ;;; (define (draw) (color_obj table (/ 254 255) (/ 197 255) (/ 48 255)) (color_obj spinner (/ 253 256) (/ 224 255) (/ 180 255)) (rice_plate_family) (chopsticks_family) (rice_bowl_family) (meats) (veggies) (tofus) (exitonclick)) (define (color_obj object r g b) (begin (begin_fill) (object) (color (rgb r g b)) (end_fill) (color (rgb 0 0 0))) ) (define (chopsticks) (begin (forward 50) (right 90) (forward 5) (right 90) (forward 50) (right 90) (forward 5) (penup) (forward 10) (right 90) (pendown) (forward 50) (right 90) (forward 5) (right 90) (forward 50) (right 90) (forward 5)) ) (define (chopsticks_family) (begin (penup) (setposition 50 -225) (pendown) (color_obj chopsticks (/ 253 256) (/ 224 255) (/ 180 255)) (penup) (setposition 240 50) (pendown) (color_obj chopsticks (/ 253 256) (/ 224 255) (/ 180 255)) (penup) (setposition -55 225) (pendown) (color_obj chopsticks (/ 253 256) (/ 224 255) (/ 180 255)) (penup) (setposition -250 -50) (pendown) (color_obj chopsticks (/ 253 256) (/ 224 255) (/ 180 255))) ) (define (table) (begin (penup) (setposition 275 0) (pendown) (circle 275)) ) (define (spinner) (begin (penup) (setposition 150 0) (pendown) (circle 150)) ) (define (rice amount total radius degrees extent) (cond ((= amount total) penup) (else (begin (pendown) (begin_fill) (circle radius) (color (rgb 1 1 1)) (end_fill) (color (rgb 0 0 0)) (penup) (circle degrees extent) (rice (+ amount 1) total radius degrees extent))) ) ) (define (reset_rice) (begin (left 90) (forward 8) (right 90)) ) (define (rice_bowl) (begin (rice 0 24 5 30 15) (reset_rice) (rice 0 24 4.75 22 15) (reset_rice) (rice 0 24 3.75 14 15) (reset_rice) (rice 0 24 3.5 6 15)) ) (define (rice_bowl_family) (begin (penup) (setposition 25 -200) (rice_bowl) (penup) (setposition 25 200) (rice_bowl) (penup) (setposition 250 0) (rice_bowl) (penup) (setposition -200 0) (rice_bowl) ) ) (define (rice_plate) (begin (pendown) (begin_fill) (circle 35) (color (rgb (/ 139 255) (/ 96 255) (/ 61 255))) (end_fill) (color (rgb 0 0 0)) (penup)) ) (define (rice_plate_family) (begin (penup) (setposition 30 -200) (rice_plate) (penup) (setposition 30 200) (rice_plate) (penup) (setposition 255 0) (rice_plate) (penup) (setposition -195 0) (rice_plate) (penup) (setposition 30 70) (rice_plate) (penup) (setposition -30 -20) (rice_plate) (penup) (setposition 90 -20) (rice_plate) ) ) (define (veg) (pendown) (circle 8 170) (forward 22) (circle 8 180) (forward 22) ) (define (veg_family amount total) (cond ((= amount total) penup) (else (begin (pendown) (begin_fill) (veg) (penup) (color (rgb 0 1 0)) (end_fill) (color (rgb 0 0 0)) (penup) (circle 20 45) (veg_family (+ amount 1) total))) ) ) (define (veg_family2 amount total) (cond ((= amount total) penup) (else (begin (pendown) (begin_fill) (veg) (penup) (color (rgb (/ 103 255) (/ 199 255) (/ 79 255))) (end_fill) (color (rgb 0 0 0)) (penup) (circle 14 45) (veg_family2 (+ amount 1) total))) ) ) (define (star angle start end) (cond ((= start end) penup) (else (begin (pendown) (forward 50) (right angle) (star angle (+ start 1) end))) ) ) (define (veggies) (begin (penup)(setposition 79 -20)(veg_family 0 12)(setposition 63 -6) (veg_family2 0 12)(right 120)(setposition 47.5 -42)(begin_fill) (star 144 0 5)(color (rgb (/ 68 255) (/ 114 255) (/ 56 255))) (end_fill)(penup)(setposition 32 -32)(right 40)(begin_fill) (color (rgb 0 0 0))(star 144 0 5) (color (rgb (/ 68 255) (/ 114 255) (/ 56 255)))(end_fill)(color (rgb 0 0 0))) ) (define (square length) (begin (forward length) (right 90) (forward length) (right 90) (forward length) (right 90) (forward length) (right 90)) ) (define (meat amount total) (cond ((= amount total) penup) (else (begin (penup) (setposition -5 70) (pendown) (begin_fill) (circle 15 180) (left 90) (forward 30) (color (rgb (/ 251 255) (/ 205 255) (/ 146 255))) (end_fill) (color (rgb 0 0 0)) (penup) (circle 10 10) (meat (+ amount 1) total))) ) ) (define (meats) (begin (meat 0 9)(setposition -7 63) (pendown)(begin_fill)(square 8)(color (rgb 1 0 0))(end_fill)(color (rgb 0 0 0))) ) (define (tofu amount total) (cond ((= amount total) penup) (else (begin (pendown) (begin_fill) (square 15) (color (rgb (/ 248 255) (/ 179 255) (/ 95 255))) (end_fill) (color (rgb 0 0 0)) (penup) (circle 10 30) (tofu (+ amount 1) total))) ) ) (define (tofus) (begin (penup)(setposition -55 -20)(left 40) (tofu 0 13) (setposition -69 -34)(pendown)(begin_fill)(square 21) (color (rgb (/ 248 255) (/ 155 255) (/ 34 255)))(end_fill)(color (rgb 0 0 0)) (penup)(setposition -59 -15)(pendown)(begin_fill)(circle 7) (color (rgb (/ 255 255) (/ 102 255) (/ 94 255)))(end_fill)(color (rgb 0 0 0))) ) (speed 0) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)