Circles and Spheres

It's very important to be familiar with the equation of a circle. You might want to draw a circle on the screen, which means graphing the equation. You might want to trace the motion of an object on a circular path. You might even want to use a bounding circle on your object for collision detection. In any of these cases, you need to manipulate the equation of a circle. Remember that in a flat plane (such as the screen), a circle is the set of all points at a given distance, called the radius, from a given fixed point, the center. Therefore, just those two elements, the center and the radius, can determine an equation for the circle. Which equation gives you the distance between the center and a point on the circle? That's ...

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.