An eye's view

Figure 3.14 shows a virtual eye that is looking down the negative $ z$ axis. It is placed in this way so that from the eye's perspective, $ x$ increases to the right and $ y$ is upward. This corresponds to familiar Cartesian coordinates. The alternatives would be: 1) to face the eye in the positive $ z$ direction, which makes the $ xy$ coordinates appear backwards, or 2) reverse the $ z$ axis, which would unfortunately lead to a left-handed coordinate system. Thus, we have made an odd choice that avoids worse complications.

Suppose that the eye is an object model that we want to place into the virtual world $ {\mathbb{R}}^3$ at some position $ e = (e_1,e_2,e_3)$ and orientation given by the matrix

$\displaystyle R_{eye} = \begin{bmatrix}\hat{x}_1 & \hat{y}_1 & \hat{z}_1  \ha...
...& \hat{y}_2 & \hat{z}_2  \hat{x}_3 & \hat{y}_3 & \hat{z}_3  \end{bmatrix} .$ (3.35)

If the eyeball in Figure 3.14 were made of triangles, then rotation by $ R_{eye}$ and translation by $ e$ would be applied to all vertices to place it in $ {\mathbb{R}}^3$.

This does not, however, solve the problem of how the virtual world should appear to the eye. Rather than moving the eye in the virtual world, we need to move all of the models in the virtual world to the eye's frame of reference. This means that we need to apply the inverse transformation. The inverse rotation is $ R^T_{eye}$, the transpose of $ R_{eye}$. The inverse of $ e$ is $ -e$. Applying (3.26) results in the appropriate transform:

$\displaystyle T_{eye} = \begin{bmatrix}\hat{x}_1 & \hat{x}_2 & \hat{x}_3 & 0 \\...
...e_1  0 & 1 & 0 & -e_2  0 & 0 & 1 & -e_3  0 & 0 & 0 & 1  \end{bmatrix} .$ (3.36)

Note that $ R_{eye}$, as shown in (3.35), has been transposed and placed into the left matrix above. Also, the order of translation and rotation have been swapped, which is required for the inverse, as mentioned in Section 3.2.

Following Figure 3.4, there are two possible interpretations of (3.36). As stated, this could correspond to moving all of the virtual world models (corresponding to Figure 3.4(b)). A more appropriate interpretation in the current setting is that the virtual world's coordinate frame is being moved so that it matches the eye's frame from Figure 3.14. This corresponds to the case of Figure 3.4(c), which was not the appropriate interpretation in Section 3.2.

Steven M LaValle 2020-01-06