;; draw-ipod consumes a posn, a number and a color (symbol)
;;
;; (draw-ipod position width color)
;;  will draw an ipod starting at the posn coordinates specified
;;    by the posn structure position, with a width specified by the parameter supplied
;;    by the user note:: width must be >= 20
;; the color is the base color, and the rest of the ipod will be white
;;
;;    note that the position is used as the top left corner of the ipod 
;;    
;; sample usage:
;; (draw-ipod (make-posn 100 200) 50 'red)
;; (draw-ipod (make-posn 150 15) 50 'blue)
;;
;; 
;; note that this requires the teachpack draw.ss and requires that the
;; start function has already been called to create a window.
(define (draw-ipod posn width color)
  (and
       (draw-solid-rect posn width (floor(* 1.75 width)) color)
       (draw-solid-rect (make-posn (+ (posn-x posn) (* width .1)) (+ (posn-y posn) (* width .1))) (* width .80) (floor(* width .55)) 'white)
       (draw-solid-disk (make-posn (+ (posn-x posn) (* .5 width)) (+ (posn-y posn) (* 1.25 width))) (* width .40) 'white)
       (draw-solid-disk (make-posn (+ (posn-x posn) (* .5 width)) (+ (posn-y posn) (* 1.25 width))) (floor(* width .11)) color)
       )  )


;(start 200 200)

;(draw-ipod (make-posn 10 10) 100 'red)