Next: The Normalization Transformation
Up: GKS-3D Primer
Previous: The Output Attributes
Setting up the Viewing Parameters is undoubtedly the most
complicated part of any 3D graphics system. When primitives are output
to a workstation they (conceptually) pass through a series of processes
called the Viewing Pipeline before they finally reach the
display surface. This pipeline is briefly described below in order that
the reader is aware of the complete process (see ).
The transformations will then be covered in more detail.
- The primitives are transformed by the Normalization
Transformation from World Coordinates (WC3) to Normalized
Device Coordinates (NDC3), which are always in the range [0.0, 1.0].
This transformation is composed of a translation and change of scale,
but no rotation. GKS-3D allows for the existence of many World
Coordinates systems, and their corresponding Normalization
Transformations are numbered from 0 upwards. Normalization
Transformation 0 always corresponds to the identity matrix.
Normalization in 3D is exactly analogous to the 2D case described
in section on Page .
- Primitives which are stored in segments are also processed by the
Segment Transformation before proceeding to the next stage.
In the 3D case this requires a 3 x 4 matrix which is
described below. The segment transformation maps NDC3 to NDC3,
and includes scaling, rotation, and translation.
- Having assembled the components in a unique NDC3 space,
primitives may next be clipped to a box to remove extraneous
information. This is called the Normalization Clip, and may be
switched on or off using the Normalization Clip Flag.
- The primitives are now 'viewed' from some arbitrary direction.
The View Orientation Transformation performs a rotation only
to take Normalized Device Coordinates to View Reference Coordinates
(VRC3). The application is free to calculate the corresponding matrix
itself, or to use a utility routine which is described below.
- The View Mapping (Projection) Transformation next takes
View Reference Coordinates to Normalized Projection Coordinates
(NPC3)
in order to provide parallel or perspective projection of the image.
As for the View Orientation Transformation, the application is free
to calculate the required matrix using its own algorithm, or to call a
utility function.
Figure: The GKS-3D Viewing Pipeline
- At this point the View Clip takes place.
It is positioned at this stage in the pipeline so that the clip box may be
defined as a rectangular parallelepiped with its sides parallel to
the axes of the NPC3 system, and thus the clipping algorithm is
more efficient. The View Clip is controlled by three Clip Flags
which allow clipping to be turned on or off separately for the
front plane, back plane, and window.
- Finally, the Workstation Transformation takes
Normalized Projection Coordinates to Display Coordinates (DC3) in order
to position the projected image in the device coordinate space. It
preserves the aspect ratio, and includes a clipping operation which
cannot be disabled. As their clip faces are parallel, the View Clip and
Workstation Clip are usually combined internally for efficiency. DC3
coordinates may be in metres or raster units. The Workstation Window
limits are [0,1]x[0,1]x[0,1].
A good implementation of the graphics pipeline will attempt to combine
as many as possible of the stages in the pipeline using matrix
concatenation in order to reduce the amount of computation necessary.
Next: The Normalization Transformation
Up: GKS-3D Primer
Previous: The Output Attributes
Janne Saarela
Mon Apr 3 17:00:12 METDST 1995