;; draw-snowman consumes a posn, a number and a color (symbol)
;;
;; (draw-sailboat pos size color)
;;  will draw a sailboat starting at the x,y coordinates specified
;;    by the posn structure position, with a size specified by size
;;    as the radius of the bottom of the boat (bottom half circle)
;;
;;    note that the position is used as the center of the bottom 
;;    half circle of the boat.
;;    
;; sample usage:
;; (draw-sailboat (make-posn 100 100) 80 'red)
;; 
;; note that this requires the teachpack draw.ss and requires that the
;; start function has already been called to create a window.
;;
(define (draw-sailboat pos size color)
  (and
   ;; draw boat portion
   (draw-solid-disk pos size color)
   (draw-solid-rect (make-posn (- (posn-x pos) size) (- (posn-y pos) size))
                    (* size 2) size
                    'white)
   ;;draw mast
   (draw-solid-line pos (make-posn (posn-x pos) (- (posn-x pos) (* size 1.3))) color)
   ;;draw sail
   (draw-solid-line (make-posn (posn-x pos) (- (posn-x pos) (* size 1.3)))
                    (make-posn (+ (posn-x pos) size) (- (posn-y pos) (* size .3)))
                    color)
   (draw-solid-line (make-posn (+ (posn-x pos) size) (- (posn-y pos) (* size .3)))
                    (make-posn (posn-x pos) (- (posn-y pos) (* size .3)))
                    color)
  )
)


;;(start 300 300)
;;(draw-sailboat (make-posn 30 30) 20 'red)