Game Development Reference
In-Depth Information
1.3.3 Left-handed versus Right-handed Coordinate Spaces
As we discussed in Section 1.2.2, all 2D coordinate systems are “equal” in
the sense that for any two 2D coordinate spaces A and B, we can rotate
coordinate space A such that +x and +y point in the same direction as
they do in coordinate space B. (We are assuming perpendicular axes.)
Let's examine this idea in more detail.
Figure 1.5 shows the “standard” 2D coordinate space. Notice that the
difference between this coordinate space and “screen” coordinate space
shown Figure 1.6 is that the y-axis points in opposite directions. How-
ever, imagine rotating Figure 1.6 clockwise 180 degrees so that +y points
up and +x points to the left. Now rotate it by “turning the page” and
viewing the diagram from behind. Notice that now the axes are oriented
in the “standard” directions like in Figure 1.5. No matter how many times
we flip an axis, we can always find a way to rotate things back into the
standard orientation.
Let's see how this idea extends into 3D. Examine Figure 1.10 once more.
We stated earlier that +z points into the page. Does it have to be this way?
What if we made +z point out of the page? This is certainly allowed, so
let's flip the z-axis.
Now, can we rotate the coordinate system around such that things line
up with the original coordinate system? As it turns out, we cannot. We
can rotate things to line up two axes at a time, but the third axes always
points in the wrong direction! (If you have trouble visualizing this, don't
worry. In just a moment we will illustrate this principle in more concrete
terms.)
All 3D coordinate spaces are not equal, in the sense that some pairs of
coordinate systems cannot be rotated to line up with each other. There are
exactly two distinct types of 3D coordinate spaces: left-handed coordinate
spaces and right-handed coordinate spaces. If two coordinate spaces have
the same handedness, then they can be rotated such that the axes are
aligned. If they are of opposite handedness, then this is not possible.
What exactly do “left-handed” and “right-handed” mean? The most
intuitive way to identify the handedness of a particular coordinate system
is to use, well, your hands! With your left hand, make an 'L' with your
thumb and index finger. 2 Your thumb should be pointing to your right, and
your index finger should be pointing up. Now extend your third finger 3 so
it points directly forward. You have just formed a left-handed coordinate
system. Your thumb, index finger, and third finger point in the +x, +y,
and +z directions, respectively. This is shown in Figure 1.12.
2 You may have to put the topic down.
3 This may require some dexterity. The authors advise that you not do this in public
without first practicing privately, to avoid offending innocent bystanders.
 
Search WWH ::




Custom Search