O'Reilly logo

Beginning Math and Physics for Game Programmers by Wendy Stahler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required