The bouncing ball
The bouncing ball.
In this program a ball bounces around the screen. This is called animation. Its position at any time is specified by its x- and y-coordinates. Initially it starts at the top left-hand corner of the window. It moves in increments of 7 pixels in the x direction, and 2 in the y direction, and leaves a series of images as it moves.