Game Development Reference
In-Depth Information
until Section 8.3, so for now let us disagree with Descartes twice-over
by saying “It'd be nice because we told you so.” 13
It's a right-handed system, and we use a left-handed system (in this
book at least).
Let's describe some spherical coordinate conventions that are better
suited for our purposes. We have no complaints against the standard con-
ventions for the radial distance r, and so we preserve both the name and
semantics of this coordinate. Our grievances are primarily concerning the
two angles, both of which we rename and repurpose.
The horizontal angle θ is renamed h,
which is short for heading and is similar to a
compass heading. A heading of zero indicates
a direction of “forward” or “to the north,” de-
pending on the context. This matches stan-
dard aviation conventions. If we assume our
3D Cartesian conventions described in Sec-
tion 1.3.4, then a heading of zero (and thus
our primary polar axis) corresponds to +z.
Also, since we prefer a left-handed coordinate
system, positive rotation will rotate clockwise
when viewed from above.
The vertical angle φ is renamed p, which
is short for pitch and measures how much we
are looking up or down. The default pitch
value of zero indicates a horizontal direction,
which is what most of us intuitively expect.
Perhaps not so intuitively, positive pitch ro-
tates downward, which means that pitch ac-
tually measures the angle of declination. This might seem to be a bad
choice, but it is consistent with the left-hand rule (see Figure 1.14). Later
we see how consistency with the left-hand rule bears fruit worth suffering
this small measure of counterintuitiveness.
Figure 7.7 shows how heading and pitch conspire to define a direction.
Figure 7.7
Heading and pitch angles used in
this topic
7.3.4 Aliasing of Spherical Coordinates
Section 7.1.2 examined the bothersome phenomenon of aliasing of 2D polar
coordinates: different numerical coordinate pairs are aliases of each other
when they refer to the same point in space. Three basic types of aliasing
were presented, which we review here because they are also present in the
3D spherical coordinate system.
13 You read the first part of Chapter 1, right?
 
Search WWH ::




Custom Search