Assignment #13: A Complex AnimationOut: 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.
world.ss Teachpack.
The animation behaves as follows:
'red
ball is added to the screen, at whatever location you choose,
with a velocity you choose. This ball does not affect any
other balls that already exist.
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.
;; 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] |