Quaternions

Ok now, we are in the three dimensional space. Shouldn't we move around a little bit? If so the camera (our eyes to the world) should move along and more important it should change its orientation to represent the direction we are looking at and the orientation of our head. The image we see is different when our head is inclined than when it is straight up. The example of the camera orientation is only the top of the iceberg. It is more important to know the orientation of our objects since this is what we actually need in our calculations.

Orientation can be represented in several ways. The first one is the matrix form. This is the one used by graphics libraries like OpenGL. It simplifies projection calculations but it is hard to maintain and update as the objects move in the virtual world. Another proposal was made by Euler and is called Euler angles. In this the orientation is expressed by three angles, one for the rotation about each axis. This method is more natural for humans and is very memory efficient. BUT, it has some important problems. Rotations are not completely of one another since the second and the third occur in the resultant coordinate system. When pitch is ±90° we have the effect called Gimbal lock where heading and banking both rotate about the vertical axis.