Graphics Reference
In-Depth Information
Figure 8.1 . An example model (left) scaled with a uniform scaling matrix (middle) and a non-uniform scal-
ing matrix (right).
in the form shown in Equation (8.1):
(8.1)
In this equation, we can see that a scaling value can be applied to each of the three coor-
dinates individually. When all three of these values are the same, the matrix is called a uniform
scaling matrix. Uniform scaling effectively only changes the size of the object being trans-
formed, while non-uniform scaling changes both its size and shape. Figure 8.1 demonstrates
various scaling matrices being applied to a model, in comparison with the original model.
Rotation matrices. The next property of our model to manipulate is the orientation.
Typically, the orientation of an object is modified by applying a rotation around one of the
three principal axes at a time. The angles of rotation are referred to as Euler angles, since
they were first described by Leonhard Euler. Each of these rotations can be applied with an
individual rotation matrix, and the complete orientation of an object is represented by three
rotation matrices—one for rotation about each of the three principal axes. Each rotation is
performed about its respective axis, meaning that the overall rotation can be considered to
occur around the origin of the model's frame of reference.
When dealing with rotations, care must be taken to ensure that the rotations are all
applied in a consistent order, since matrix multiplication is not commutative. A rotation
about each axis can be created as shown in Equation (8.2):
Search WWH ::




Custom Search