;; Purpose: to draw a smiley face. ;; this function takes 4 arguments- the position, the radius of the smile face, the face color and the eye color. ;; Example: (smile (make-posn 100 100) 10 'yellow 'white) will produce a smile at 100 100 with radius of 10 and yellow face white eyes (define (smile pos rad face eyes) (and (draw-solid-disk pos rad face) (draw-circle pos (* rad .7) 'black) (draw-solid-rect (make-posn (- (posn-x pos) (* rad .7)) (-(posn-y pos) (* rad .7))) (* 1.4 rad) (+ (* .6 rad) (* .5 rad)) face) (draw-solid-disk (make-posn (-(posn-x pos) (* rad .5)) (-(posn-y pos) (* rad .5))) (* .2 rad) eyes) (draw-solid-disk (make-posn (+(posn-x pos) (* rad .5)) (-(posn-y pos) (* rad .5))) (* .2 rad) eyes) )) ;(start 200 200) ;(smile (make-posn 100 100) 50 'yellow 'red)