Animation is the technique of producing a sequence of still pictures fast enough that our eye–mind connection interprets the sequence as motion. This chapter introduces the topic of animation by presenting four sketches. You’ll first implement a bouncing ball, namely a circle that moves in a window, changing direction (bouncing) off the sides. You’ll then implement a set of three bouncing balls, a bouncing pentagon, and a bouncing polygon in which the user can change the number of sides by pressing the mouse button.
Before actually implementing the sketches, I present ...