;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: WHAT YOU SEE HERE is a LIFE PROCEDURE full of circles and straight lines! ;;; ;;; Description: ;;; < A procedure of a CS LIFE takes in "one" thing: ;;; (the sacrifices of sleep, fun, tv show, pokemon... in exchange with GREAT KNOWLEDGE! (in honor to John DeNero)). ;;; Together, we gain experiences (represented by 0s and 1s) that allow us to recursively move on to the next chapter of cs life.> (define (draw) ;;;;;;;;;;;;;;;;;;;;;;;; ;;;BACKGROUND SETTING;;; ;;;;;;;;;;;;;;;;;;;;;;;; (bg "black") (speed 0) (ps 5) (pd) (ht) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;DEFINE FREQUENTLY USED MOVES and SHAPES;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; invisible move to (X,Y) and set new direction (define (hide_move x y dir) (pu)(setpos x y)(seth dir)(pd) ) ; create open bracket at (X,Y) (define (open_bracket x y) (hide_move x y 190) (color "white") (circle 40 160) ) ; create close bracket at (X,Y) (define (close_bracket x y) (hide_move x y 170) (color "white") (circle 40 -160) ) ; create dot of SIZE at (X,Y) (define (set_dot x y size) (color "#9A2EFE") (hide_move x y 0) (dot size) ) ; create lambda at (-250,Y) (define (make_lambda y) (hide_move -250 (- y 20) -110) (circle 10 -160) (seth -70) (fd 40) (circle 10 160) (hide_move -230 (- y 30) -115) (fd 43) ) ; create ZERO at (X,Y) [x:30,y:40] (define (zero x y) (hide_move (+ x 20) (- y 15) 90) (fd 5) (circle 5 180) (fd 5) (circle 5 180) ) ; create ONE at (X,Y) [x:30,y:15] (define (one x y) (hide_move (+ x 12.5) (- y 10) 0) (circle 2.5 90) (seth 270) (fd 10) (hide_move (+ x 10) (- y 19) 0) (fd 10) ) ; Define edges (define bl_edge (/ (* (win_h) -1) 2)) (define ul_edge (/ (win_h) 2)) (define l_edge (/ (win_w) -2)) (define r_edge (/ (win_w) 2)) ;;;;;;;;;; ;;;DRAW;;; ;;;;;;;;;; ; ;FIRST LINE ; (define y1 220) ;( (open_bracket -270 y1) ;lambda (make_lambda y1) ;( (open_bracket -145 y1) ;+ (hide_move -105 (- y1 20) 270) (fd 50) (hide_move -130 (- y1 45) 0) (fd 50) ;( (open_bracket -25 y1) ;- (hide_move -15 (- y1 45) 0) (fd 40) ;FOUR things (ps 3) (color "#9A2EFE") ; 1: sleep (hide_move 52 (- y1 14) 300) (circle 20 120) (hide_move 69 (- y1 25) 270) (fd 10) (hide_move 60 (- y1 23) 245) (fd 10) (hide_move 77 (- y1 23) -65) (fd 10) ; 2: game -..- (hide_move 68 (- y1 55) 90) (circle 8 180) (seth 250) (fd 20) (circle 8 180) (fd 5) (seth 0) (fd 20) (hide_move 68 (- y1 55) 0)(fd 10) (hide_move 78 (- y1 55) 270) (circle 8 -180) (seth 290) (fd 18) (seth 120) (circle 8 -180) (seth 115) (fd 5) ;cross (hide_move 60 (- y1 60) 270)(fd 8) (hide_move 56 (- y1 64) 0)(fd 8) ;four dots (set_dot 82 (- y1 65) 5) (set_dot 90 (- y1 65) 5) (set_dot 86 (- y1 61) 5) (set_dot 86 (- y1 69) 5) ;3 ? (hide_move 140 (- y1 10) 90) (circle 10 180) (hide_move 140 (- y1 10) 235) (fd 20) (hide_move 130 (- y1 35) 0) (dot 5) ;4 emotion (hide_move 125 (- y1 55) 90) (circle 10 240) (seth 310) (fd 25) (seth -310) (fd 25) (seth 30) (circle 10 240) ;clock (ps 5) (hide_move 170 (- y1 25) 245) (circle 35) (hide_move 205 (- y1 40) 0) (fd 20) (hide_move 205 (- y1 40) 90) (fd 20) ;( (close_bracket 250 y1) ; ;SECOND LINE ; (define y2 60) (define (Denero x2) ;hair (begin_fill) (color "#61380B") (hide_move (- x2 20) 20 90) (fd 50) (seth 270) (circle 6 -180) (seth 270) (circle 2 180) (seth 270) (circle 6 -180) (seth 270) (circle 2 180) (seth 270) (circle 7 -180) (seth 270) (circle 2 180) (seth 270) (circle 7 -180) (seth 270) (circle 2 180) (seth 270) (circle 6 -180) (seth 270) (fd 50) (seth 180) (fd 80) (end_fill) ;face (begin_fill) (color "#F7BE81") (hide_move (- x2 20) 10 275) (fd 40) (seth 295) (circle 40 130) (seth 85) (fd 40) (circle 40 190) (end_fill) ;eyebrows (color "black") (hide_move (- x2 12) 25 0) (fd 25) (hide_move (+ x2 28) 25 0) (fd 25) ;eye (define (eye x) (hide_move x 0 90) (fd 15) (seth 0) (fd 25) (seth 270) (fd 15) (seth 180) (fd 25) ) ;glasses (color "white") (begin_fill) (eye (- x2 12)) (end_fill) (begin_fill) (eye (+ x2 28)) (end_fill) (color "black") (eye (- x2 12)) (eye (+ x2 28)) ;nose (hide_move (+ x2 25) -5 180) (circle 10 180) ;mouth (ps 3) (hide_move (+ x2 5) -35 310) (circle 20 103) (hide_move (+ x2 5) -35 0) (fd 30) (ps 5) ) (Denero -250) (Denero -150) (Denero -50) (set_dot 50 0 10) (set_dot 70 0 10) (set_dot 90 0 10) (Denero 150) (close_bracket 250 y2) ; ;THIRD LINE ; (define y3 -100) ;( (color "white") (open_bracket -270 y3) ;lambda (make_lambda y3) ;0s & 1s ;;;RECURSION (color "#9A2EFE") (define (fill x y) (if (> x 100) ((close_bracket 150 y3) (close_bracket 200 y3) (close_bracket 250 y3))) ((random zero one) x y) (cond ((< y -150) (fill (+ x 25) (+ y3 15))) (else (fill x (- y 20))) ) ) (fill (+ l_edge 170) (+ y3 15)) (exitonclick) ) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)