;; Posns and Images ;; A Posn is (make-posn Number Number) ;; A List-of-Posns is one of: ;; - empty ;; - (cons Posn List-of-Posns) ;;TODO: write template ;; Define a function 'from-orig' which takes a list of posns and ;; returns a list of numbers ;; each number is the distance from the posn to origin (0 0) ;; example: (from-orig (cons (make-posn 3 4) (cons (make-posn 6 8) empty)))) -> (cons 5 (cons 10 empty)) ;; Define a function 'increment-y' which takes a posn and increments ;; the y-coordinate by 10 ;; Define a function 'inc-list' which takes a list of posns and increments ;; all the y-coordinates by 10 ;;load the world.ss package ;; Define a scene ;; Define an image ufo by overlaying an ellipse and a circle ;; Define a function 'world-scene' that takes a list of posns ;; and places ufos at those locations into your defined scene ;; finally run your list of posns through this ;; World -> World (define (world-new list-of-posns) (update (world-scene list-of-posns) produce (inc-list list-of-posns))) (big-bang 600 200 .1 (cons 1 (cons 10 (cons 50 empty)))) (on-tick-event world-new)