MAPaint Technical Report:
Up is Up

next up previous contents
Next: Look up Tables for Up: Viewing Planes Previous: Walking Around the Statue

Up is Up

In this model the projection of a predefined direction ``up'' will always be displayed as the vertical in the section view. If the viewing direction is parallel to this vector then the angle of rotation around the viewing direction is not defined and an arbitrary choice can be made. A consequence of this is that for small changes in viewing direction around the ``up'' vector may give rise to arbitrarily large changes in the display orientation. This effect occurs for any rule which determines the screen orientation solely from the static viewing orientation. If a smooth transformation is required then it is necesary to select the orientation not just in terms of the viewing direction but also in terms of the previously viewed section, dynamic information is required. This of course means that the viewing direction does not uniquely define the section orientation.

To establish the viewing transformation we need to calculate the Euler angle $\zeta$ so that the projection of the up vector, u, is parallel to the displayed y-axis. To do this we calculate the angle $\omega$ between the component of the vector uperpendicular to the viewing direction and the y-axis in the new coordinate system for the transformation $R(\xi,\eta,\zeta) =
R(\theta,\phi,0)$. The angle $\zeta$ is then $\omega$ or $\omega -
\pi$ depending on the orientation of the y-axis on the screen. This angle can be easily established by rotating the up vector by $R(\theta,\phi,0)$ and calculating the angle of the projection of this vector to the transformed y-axis. Thus if


w = $\displaystyle R {\mathbf{u}}, \;\;\;\;\mbox{then}$ (11)
$\displaystyle \omega$ = $\displaystyle \tan^{-1} (\frac{{w}_x}{{w}_y}).$ (12)

Given the Euler angles the view transformation is calculated in exactly the same way as for the other viewing mode.


next up previous contents
Next: Look up Tables for Up: Viewing Planes Previous: Walking Around the Statue

Richard Baldock
1998-06-05