;; Contract: draw-ufo numbers and symbols -> image ;; Purpose: This function takes four numerical paramters and two symbolic parameters to create an image of an unidentified flying object. (define (draw-ufo xposition yposition shipwidth shipheight orbradius shipcolor orbcolor) (and (draw-solid-disk (make-posn xposition (+ yposition (* shipheight .5))) (* shipheight .5) shipcolor) (and (draw-solid-disk (make-posn (+ xposition shipwidth) (+ yposition (* shipheight .5))) (* shipheight .5) shipcolor) (and (draw-solid-disk (make-posn (+ xposition (* shipwidth .5)) yposition) orbradius orbcolor) (draw-solid-rect (make-posn xposition yposition) shipwidth shipheight shipcolor))))) ;; Example: (draw-ufo 300 300 100 30 15 'red 'green) ;; This will draw a red and green unidentified flying object with its top left corner at the coordinate (300,300). ;; Tests: ;; These should produce red and green, and purple and green UFOs with different dimensions in different locations. ;(start 300 300) ;; Opens up a canvas of 500 by 500. ;(draw-ufo 100 100 50 16 8 'red 'green) ;(draw-ufo 50 350 100 30 15 'purple 'green)