Assignment #13: A Complex Animation

Out: Thursday, April 2nd   Due: Thursday, April 16th, 4:00pm

This homework must be done and submitted with your partner. Please see the submissions page for details on how to submit with your partner.

This homework is optional. If you choose to complete it, we will grade it, and replace your lowest homework score with the grade you receive. If your lowest homework score is better than the grade you receive, your grade will not change.

In order to take advantage of this, the code you submit must run successfully, and produce an animation. Any code that does not run will not be graded.



Questions

  1. Develop an animation using the world.ss Teachpack. The animation behaves as follows:
  2. The following additions are not required, but are recommended:

    To make your animation more interesting, place each new ball at a random location, or with a random velocity, or both. The random function is useful here.

    To make the animation even more interesting, you might choose a random color for the ball.

  3. The following data definition is recommended to start with. You may need to extend it.
    ;; A Vel is (make-vel Number Number) (define-struct vel (x y)) ;; A Ball is (make-ball Posn Vel) (define-struct ball (p v)) ;; A World is a Listof[Ball]