Game Development Reference
In-Depth Information
When r < 0, it is interpreted as “backward” movement—displacement
in the opposite direction that we would move if r were positive. If θ is
outside the range [−180 o ,+180 o ], that's not a cause for panic; we can still
determine the resulting direction. 4 In other words, although there may be
some “unusual” polar coordinates, there's no such thing as “invalid” polar
coordinates. A given point in space corresponds to many coordinate pairs,
but a coordinate pair unambiguously designates exactly one point in space.
One way to create an alias for a point (r,θ) is to add a multiple of 360 o
to θ. This adds one or more whole “revolutions,” but doesn't change the
resulting direction defined by θ. Thus (r,θ) and (r,θ + k360 o ) describe the
same point, where k is an integer. We can also generate an alias by adding
180 o to θ and negating r; which means we face the other direction, but we
displace by the opposite amount.
In general, for any point (r,θ) other than the origin, all of the polar
coordinates that are aliases for (r,θ) can be expressed as
(−1) k r,θ + k180 o
,
where k is any integer.
So, in spite of aliasing, we can all agree what point is described by the
polar coordinates (r,θ), no matter what values of r and θ are used. But
what about the reverse problem? Given an arbitrary point p in space, can
we all agree what polar coordinates (r,θ) should be used to describe p ?
We've just said that there are an infinite number of polar coordinate pairs
that could be used to describe the location p . Which do we use? The short
answer is: “Any one that works is OK, but only one is the preferred one to
use.”
It's like reducing fractions. We all agree that 13/26 is a perfectly valid
fraction, and there's no dispute as to what the value of this fraction is.
Even so, 13/26 is an “unusual” fraction; most of us would prefer that this
value be expressed as 1/2, which is simpler and easier to understand. A
fraction is in the “preferred” format when it's expressed in lowest terms,
meaning there isn't an integer greater than 1 that evenly divides both
the numerator and denominator. We don't have to reduce 13/26 to 1/2,
but by convention we normally do. A person's level of commitment to this
convention is usually based on how many points their math teacher counted
off on their homework for not reducing fractions to lowest terms. 5
4 Warning: extremely large values of θ may cause dizziness if step 1 in Figure 7.2 is
followed literally.
5 Speaking of math teachers and reduced fractions, one author remembers his middle
school math teacher engaged in a fierce debate about whether a mixed fraction such as
2 3/5 is “simpler” than the corresponding improper fraction 13/5. Luckily, the answer
to this profound mystery isn't necessary in the context of polar coordinate aliasing.
Search WWH ::




Custom Search