Abstracting the Eye

One of the stages of the graphics pipeline is eye space, the coordinate system in which the viewer's eye is assumed to be at the origin looking down the negative z-axis. You've learned that this space is convenient for lighting. In particular, knowing the eye is at \(\begin{bmatrix}0&0&0\end{bmatrix}\) simplifies computation of a fragment's specular term.

However, parking the eye permanently at the origin and fixing its gaze to the negative z-axis is limiting. For a model to be visible, you must transform it away from the origin along the line of sight. This transformation away from the eye feels artificial.

A more natural system would let you situate the eye anywhere in world space looking in any direction. The system could then automatically generate a transformation between the world space coordinates in which you'd like to work and the eye space coordinates that you need in your shading algorithms.

You are ready to build this system. Read on to learn how to encapsulate the notion of an adjustable eye in a Camera class.