Graphics Reference
In-Depth Information
view direction and in the plane defined by the view direction and the global y -axis. A rotation away
from this up direction will effect a tilt of the observer's head.
In order to efficiently project the data onto a view plane, the data must be defined relative to the
camera, in a camera-centric coordinate system ( u , v , w ); the v -axis is the observer's y -axis, or up vector ,
and the w -axis is the observer's z -axis, or view vector . The u -axis completes the local coordinate system
of the observer. For this discussion, a left-handed coordinate system for the camera is assumed.
These vectors can be computed in the right-handed world space by first taking the cross-product of
the view direction vector and the y -axis, forming the u -vector, and then taking the cross-product of
the u -vector and the view direction vector to form v (Eq. 2.1) .
w ¼ COI EYE
view direction vector
u ¼ w ð
0
;
1
;
0
Þ
cross productwith
y -axis
(2.1)
v ¼ u w
After computing these vectors, they should be normalized in order to forma unit coordinate systemat the
eye position. Aworld space data point can be defined in this coordinate systemby, for example, taking the
dot product of the vector from the eye to the data point with each of the three coordinate system vectors.
Head-tilt information can be provided in one of twoways. It can be given by specifying an angle deviation
from the straight-up direction. In this case, a head-tilt rotation matrix can be formed and incorporated in the
world-to-eye-space transformation or can be applied directly to the observer's default u -vector and v -vector.
Alternatively, head-tilt information can be given by specifying an up-direction vector. The user-
supplied up-direction vector is typically not required to be perpendicular to the view direction as that
would require too much work on the part of the user. Instead, the vector supplied by the user, together
with the view direction vector, defines the plane in which the up vector lies. The difference between the
user-supplied up-direction vector and the up vector is that the up vector by definition is perpendicular to
the view direction vector. The computation of the perpendicular up vector, v , is the same as that out-
lined in Equation 2.1 , with the user-supplied up direction vector, UP , replacing the y -axis (Eq. 2.2) .
w ¼ COI EYE
view direction vector
u ¼ w UP
cross product with user's up vector
(2.2)
v ¼ u w
Care must be taken when using a default up vector. Defined as perpendicular to the view vector and in
the plane of the view vector and global y -axis, it is undefined for straight-up and straight-down views.
These situations must be dealt with as special cases or simply avoided. In addition to the undefined
cases, some observer motions can result in unanticipated effects. For example, the default head-up ori-
entation means that if the observer has a fixed center of interest and the observer's position arcs
directly, or almost so, over the center of interest, then just before and just after being directly overhead,
the observer's up vector will instantaneously rotate by up to 180 degrees (see Figure 2.2 ) .
In addition to the observer's position and orientation, the field of view (fov) has to be specified to
fully define a viewable volume of world space. This includes an angle of view (or the equally useful half
angle of view ), near clipping distance , and far clipping distance (sometimes the terms hither and yon
are used instead of near and far ). The fov information is used to set up the perspective projection .
The visible area of world space is formed by the observer position and orientation, angle of view,
near clipping distance, and far clipping distance ( Figure 2.3 ) . The angle of view defines the angle made
between the upper and lower clipping planes, symmetric around the view direction. If this angle is
 
Search WWH ::




Custom Search