Visualization Experience: Collision Detection

On the CD-ROM, you will find a demo named Circles. Here's a brief description from the programmer:

This example is used to demonstrate the movement and collision of two circles with the bounds of the screen and each other. The circles are placed in random positions on the screen and are given random directions to travel in. To maintain simplicity, true vector reflection is not used for the collision of the balls. Instead, a basic reflection algorithm is used to maintain the appearance of true reflection.

Dustin Henry

Go ahead and run the demo by double clicking circles.exe. You'll see the two balls bounce around and occasionally collide with each other. Behind the scenes, the computer is checking ...

Get Beginning Math and Physics for Game Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.