Several coordinate transforms are required to create the robot
display, especially the three-dimensional view. To describe the
coordinate transforms, world and moving coordinates are defined
for the initial phase; view and projection transforms are used for
the subsequent phases. The world coordinate system describes
all points with respect to origin-referenced coordinates, while
the moving coordinate system is defined on the object with respect
to local coordinates.
The position and orientation of a local coordinate-based object
can be expressed in world coordinates using a translation and orientation
transformation matrix. A view transformation is used to
transform all objects into camera coordinates and places a viewer
in the world coordinate system. In camera space, the camera or
viewer is placed at the origin, viewing in the positive z-direction.
The corresponding view matrix for the view transformation relocates
objects near the cameras from the world coordinate system.
The view matrix is derived by combining the translation and rotation
matrices for each axis.
We apply a projection transformation after the view transformation.
This is similar to adjusting the inside of a camera or selecting
a camera lens, and consists of a scale and perspective
adjustment. The transformation converts the viewing frustum into
a cube. Since the near end is smaller than the far end at the viewing
frustum, the transformation effectively enlarges the object.
The far and near transformations move the viewing frustum to
new coordinates. When the frustum is modified to a cube, the origin
moves from the top left corner to the center. However, the projection
matrix adjusts the translation and orientation of the object
based on the distance from the camera to the front clipping plane.
This gives rise to an indeterminate depth comparison between objects
if we do not consider the field of view, which means that
every object over a range of distances will have almost the same
z value. To overcome this problem, an aspect ratio of the viewport
is taken into consideration for each point of the object. Fig. 15 illustrates
the projection and perspective projective transformations
for the Scoutrobot, and implies that the latter is more realistic because
a robot located in the distance is drawn smaller than a robot
located close by.