The simplest type of collision to model is one in which a moving object collides with a fixed stationary object, such as a billiard ball hitting the bumper. The bumper doesn't move, so you only need to model the resulting motion of one object, the ball. This type of scenario can be modeled using **vector reflection**, which refers to the motion of the moving object—in this case, the ball. An interesting symmetry exists: The angle that the ball comes in at must equal the angle at which it leaves. In other words, the **angle of incidence** (incoming) must equal the **angle of reflection** (outgoing), as shown in Figure 13.1.

This process is very simple to program if the wall is perfectly horizontal ...

Start Free Trial

No credit card required