Game Development Reference
In-Depth Information
points that all have the same y-coordinate. The grid lines in a polar coor-
dinate system are similar:
The “grid circles” show lines of constant r. This makes sense; after
all, the definition of a circle is the set of all points equidistant from
its center. That's why the letter r is the customary variable to hold
this distance, because it is a radial distance.
The straight grid lines that pass through the origin show lines of
constant θ, consisting of points that are the same direction from the
origin.
One note regarding angle measurements. With Cartesian coordinates,
the unit of measure wasn't really significant. We could interpret diagrams
using feet, meters, miles, yards, light-years, beard-seconds, or picas, and it
didn't really matter. 1 If you take some Cartesian coordinate data, inter-
preting that data using different physical units just makes whatever you're
looking at get bigger or smaller, but it's proportionally the same shape.
However, interpreting the angular component of polar coordinates using
different angular units can produce drastically distorted results.
It really doesn't matter whether you use degrees or radians (or grads,
mils, minutes, signs, sextants, or Furmans), as long as you keep it straight.
In the text of this topic, we almost always give specific angular measure-
ments in degrees and use the o symbol after the number. We do this because
we are human beings, and most humans who are not math professors find
it easier to deal with whole numbers rather than fractions of π. Indeed,
the choice of the number 360 was specifically designed to make fractions
avoidable in many common cases. However, computing machines 2 prefer
to work with angles expressed using radians, and so the code snippets in
this topic use radians rather than degrees.
7.1.2 Aliasing
Hopefully you're starting to get a good feel for how polar coordinates work
and what polar coordinate space looks like. But there may be some nagging
thoughts in the back of your head. Consciously or subconsciously, you
may have noticed a fundamental difference between Cartesian and polar
space. Perhaps you imagined a 2D Cartesian space as a perfectly even
continuum of space, like a flawless sheet of Jell-O, spanning infinitely in all
directions, each infinitely thin bite identical to all the others. Sure, there
1 There might be some employees at NASA who feel otherwise, since the $125 million
Mars Climate Orbiter went astray due to a bug involving confusion between metric and
English units. Perhaps we should say that knowing the specific units of measurement
isn't necessary to understand the concepts of Cartesian coordinates.
2 Such as math professors.
 
Search WWH ::




Custom Search