[Angel p189; Foley p208-210, 222-226]
Composition and Inversion of Transformations
A series of transformations can be accumulated into a single transformation
matrix.
Suppose our object is defined as follows:
Suppose we wish to place the object in our scene like this:
This can be accomplished in several ways, one of which is:
Substituting (1) in (2) gives:
Comments on Matrix Composition
-
compositions of transformations are non-commutative
e.g., trans(2,1,0)rot(z,-90) != rot(z,-90)trans(2,1,0)
-
Transformations can be thought of as a change in coordinate system.
-
transformations matrices can be multiplied together, giving a single
composite transformation matrix
- Inverting a transformation matrix produces the 'inverse' of a transformation.
e.g., if M = translate(a,b,c) then M-1 = translate(-a,-b,-c).
-
The transformations necessary to convert a point from CS2 to CS1 are
given by the transformations necessary to align the CS1 frame with the
CS2 frame.
- Premultiplication effects a transformation in 'world' or 'fixed' coordinates.
- Postmultiplication effects a transformation in 'local' coodinates.
- Open GL postmultiplies transformation, i.e., applies them in 'local' coordinates.