;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: ;;; ;;; Description: ;;; (define (heart x y c) (color "#FF0000") (right x y c) (left (- x 15) y c)) (define (broken n) (cond ((= n 0) (fd 10)) ((= (modulo n 2) 0) (fd 10) (rt 90) (broken (- n 1))) (else (fd 10) (lt 90) (broken (- n 1))))) (define (background m n x y) ;m is the number of rows of hearts. ;n is the number of hearts. ;(/ n m) is the number of columns of hearts. ;Make sure n%m = 0 for evenly distributed hearts. (cond ((= n 0) (pu)) ((= (modulo (- n 1) m) 0) (which-color m n x y) (background m (- n 1) (+ x 120) (+ y (* 90 (- m 1))))) (else (which-color m n x y) (background m (- n 1) x (- y 90))))) (define (which-color m n x y) (cond ((= (modulo n 2) 0) (heart x y "pink")) (else (heart x y "#CBBAED")))) (define (left x y c) (pu) (goto x y) (pd) (begin_fill) (color c) (seth 315) (fd 50) (circle -25 180) (rt 90) (broken 9) (end_fill)) (define (right x y c) (pu) (goto x y) (pd) (begin_fill) (color c) (seth 45) (fd 50) (circle 25 180) (broken 9) (end_fill)) (define (pepe) (seth 0) (thickness 3) (color "#566435") (penup) (setpos -290 -110) (pendown) (lt 20) (circle -250 20) (rt 10) (circle -220 20) (circle -50 60) (penup) (lt 80) (setpos -240 50) (pendown) (fd 20) (circle -90 100) (rt 30) (circle -120 25) (lt 90) (circle -200 30) (circle -80 20) (penup) (circle -80 -20) (circle -200 -30) (rt 90) (circle -120 -15) (rt 10) (pendown) (lt 120) (circle -70 70) (rt 30) (circle -120 25) (penup) (setpos -93 93) (rt 135) (pendown) (circle 120 30) (lt 10) (circle 60 40) (circle 60 -40) (rt 10) (circle 120 -40) (lt 25) (circle 120 50) (circle -20 60) (penup) (circle -20 -60) (circle 120 -50) (rt 25) (pendown) (circle 120 -8) (lt 30) (circle 120 50) (circle -40 30) (rt 80) (backward 5) (lt 80) (backward 20) (lt 180) (circle 200 20) (circle -150 10) (rt 80) (circle -30 75) (rt 20) (circle -200 20) (rt 20) (circle -40 40) (penup) (circle -40 -40) (lt 20) (circle -200 -20) (pendown) (rt 180) (circle -5 150) (rt 30) (circle -200 24) (penup) (circle -200 -18) (lt 30) (pendown) (circle -200 10) (penup) (goto -85 32) (rt 105) (pendown) (thickness 1) (begin_fill) (color "black") (circle 26 167) (lt 90) (end_fill) (penup) (begin_fill) (color "white") (goto -110 40) (pendown) (circle 2 360) (end_fill) (penup) (begin_fill) (color "white") (goto -120 30) (pendown) (circle 2 360) (end_fill) (penup) (begin_fill) (color "white") (goto -100 30) (pendown) (circle 4 360) (end_fill) ; right eye (thickness 3) (color "#566435") (penup) (goto -70 75) (lt 14) (pendown) (circle -230 26) (rt 40) (circle -20 20) (penup) (goto -63 67) (lt 85) (pendown) (circle -250 23) (rt 40) (circle -20 20) (penup) (goto -67 60) (pendown) (lt 85) (circle -250 24) (rt 20) (circle -10 140) (lt 5) (circle -250 26) (penup) (goto -62 10) (pendown) (rt 180) (circle 150 30) (lt 20) (circle 100 27) (penup) (goto -40 38) (pendown) (lt 15) (thickness 1) (begin_fill) (color "black") (circle -28 150) (rt 100) (circle -200 16) (end_fill) (penup) (begin_fill) (color "white") (goto -15 60) (pendown) (circle 2 360) (end_fill) (penup) (begin_fill) (color "white") (goto -20 50) (pendown) (circle 2 360) (end_fill) (penup) (begin_fill) (color "white") (goto 0 55) (pendown) (circle 4 360) (end_fill) (thickness 3) (penup) (color "#566435") (goto -62 10) (pendown) (rt 20) (backward 20) (penup) (goto 0 15) (rt 30) (pendown) (circle 70 -43) ;mouth (color "#A1674A") (lt 110) (circle -330 30) (lt 20) (circle 80 23) (lt 20) (circle 20 160) (rt 60) (circle 15 28) (circle -300 5) (circle 350 22) (circle 9 160) (lt 18) (circle -350 25) (circle 70 24) (penup) (circle 70 -24) (circle -350 -25) (pendown) (circle -350 -2) (rt 190) (circle 10 170) (color "#566435") (penup) (goto -180 -90) (pendown) (lt 5) (circle -22 100) (penup) (goto -12 -79) (pendown) (rt 20) (circle 80 -40) ;neck/collar (lt 5) (circle 300 -10) (circle 250 -30) (lt 15) (circle 100 -20) (goto -290 -110)) (define (harambe) (thickness 1) (color "#707070") (pu) (goto 50 -200) (begin_fill) (seth -30) (pd) (fd 10) (seth 15) (fd 25) (rt 40) (fd 15) (circle 8 70) (seth 0) (circle -70 10) (circle -50 40) (circle -30 75) (circle 15 100) (circle -30 30) (fd 10) (rt 25) (fd 17) (lt 45) (fd 30) (rt 30) (circle -40 40) (rt 60) (fd 17) (lt 40) (fd 14) (rt 90) (fd 11) (lt 80) (circle -90 15) (rt 70) (fd 17) (rt 35) (fd 12) (lt 80) (circle 200 7) (lt 20) (fd 10) (rt 20) (circle -200 11) (rt 30) (fd 10) (seth -90) (fd 26) (rt 20) (circle -5 150) (lt 10) (circle 5 120) (fd 8) (rt 40) (fd 23) (seth 190) (fd 20) (rt 10) (fd 26) (rt 20) (circle -8 57) (seth -90) (fd 8) (circle -7 160) (lt 70) (fd 20) (lt 130) (circle -25 75) (seth 175) (fd 15) (circle 7 80) (rt 20) (circle -6 150) (seth -90) (fd 24) (rt 90) (fd 10) (lt 30) (fd 30) (lt 100) (fd 40) (lt 100) (fd 5) (circle -4 160) (seth -90) (fd 24) (rt 60) (fd 10) (end_fill) ) (define (draw) (speed 300) (background 7 77 -570 250) (pepe) (harambe) (hideturtle) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)