Search Tips
Advanced Search
Computer Visualization: Graphics Techniques for Engineering and Scientific Analysis
by Richard S. Gallagher. Solomon Press
CRC Press, CRC Press LLC
ISBN: 0849390508 Pub Date: 12/22/94
Search this book:
Previous Table of Contents Next
2.8 Transformations
A transformation, in our context, is an operation on a model which results in another model, differing from
the original only by geometric parameters. It is traditional, and indeed useful, to distinguish three categories
of transformations: modelling transformations, which take a master object (often called a canonical object)
and create a specific instance of that object; instance transformations, which are mostly to position the
instance in the world coordinate system (the coordinate system in which the objects are created); and the
viewing transformations, which put the objects into the camera (or “eye”) coordinate system for display
purposes.
For example, using a unit sphere centered at the origin as the master object, a modelling transformation could
transform it into an ellipsoid with a major axis along X of length 5 and a minor axis along Y of length 3; an
instance transformation might take that ellipsoid, rotate it by 20 degrees around the Z axis and translate it so
that its center is at (20, 10, -5), and the viewing transformation will transform it so that it is viewed from a
point of coordinates (100, 200, 50) looking at a point (0, 10, 10) (the latter transformation is not completely
specified; as an exercise for the reader, what is left to specify?).
In most systems the range of transformations that can be used for the first two types is limited to affine
transformations. Two definitions of affine will help show why this is a useful class: affine transformations
leave parallel straight lines straight and parallel, and they can be expressed in N dimensions as N × N matrices
of constants. The first property means that all parallelograms can be transformed into squares by an affine
transformation, or inversely, that an affine transformation cannot do “worse” on a square than to transform it
into a parallelogram, and the second means that any combination of affine transformations can be expressed
as a single matrix. That is very important for both conceptual and practical reasons: one can build complex
affine transformations from simple ones, easy to write, and one can build hardware applying related affine
transformations to thousands or millions of points.
The basic transformations that can be used to build up to any affine transformation are scaling, rotation and
shearing. While the first two are familiar, the last might not be. In shearing, a coordinate is scaled
proportionally to another (see Figure 2.8). It is interesting to note that this is not a “minimal” list: shearings
can be expressed as scalings and rotations, and rotations can be expressed as scalings and shearings. Note also
that rotations are the transformations that can be applied in the real world to rigid objects, since all distances
are conserved in a pure rotation. The matrices expressing the basic transformations are as follows in 2-D. For