Coordinate SystemsAs you may have guessed, we are going to have to use a coordinate system to model any type of object in 3D. Luckily, if you know anything about Algebra, this should come as second nature. Take a look at Figure 1. This is the standard Cartesian coordinate system used in high school Algebra. Using this system, you can define a point anywhere in 2D space. Figure 1 – The Cartesian Coordinate System Now, all we have to do as add a Z-axis to this system and we can define a point anywhere in 3D space. It sounds simple enough, but there is a bit of a catch. The positive Z-axis can point either in or out. When the Z-axis points in, it's called the Left-handed system. When the Z-axis points out, it's called the Right-handed system. If this sounds confusing, take a look at Figure 2.
Figure 2 – Left-handed System vs. Right-handed System You can choose either the Left-handed system or the Right-handed system, but keep in mind that your choice will affect some of your math later on. I will be using the Left-handed system throughout these papers. Generally, game programmers choose this system because it is easier to conceptualize the positive Z-axis pointing into the screen. |
|||||||||||