(b) After transformation.
Solution
Before the transformation, the set of eight vertices (1, 2, …, 8) in their homogeneous coordinates is written as
Using the given scales along the x, y, z axes, the scaling matrix Eq. (2.6) is given as
Therefore, the set of vertices of the object after scaling transformation can be found as
A 3D reflection refers to a transformation of mirroring an object about a specified plane. A reflection transformation matrix can be treated as a special case of a scaling matrix, where the scale of the corresponding axis of the reflected coordinate is set as a negative value of −1. Note that the axis for the reflection is aligned with the normal reflecting or mirroring plane. Therefore, the reflection coordination transformations about YZ, XZ, and XY planes are expressed by [T]RE_YZ, [T]RE_XZ, and [T]RE_XZ, respectively, as follows:
(2.7)
Example 2.2
Figure 2.12a shows an object in the coordinate system (O‐XYZ) with the specified set of vertices as follows:
Figure 2.12 Reflection coordinate transformation matrices of an object. (a) Object at the original position. (b) Reflected object about the XY plane. (c) Reflected object about the YZ plane. (d) Reflected object about the YZ plane.
Determine the reflected objects about the XY, YZ, XZ planes, respectively.
Solution
Using Eq. (2.7), the vertices of the reflected objects about the XY, YZ, XZ planes are determined and illustrated in Figure 2.12b to d, respectively. Taking as an example determination of the reflected object about the XY plane,
where [T]RE − XY is given in Eq. (2.7) for the reflected object about the XY plane.
The coordinate transformation matrix for an object with a shearing transformation is represented as (TutorialsPoint 2018)
(2.8)
where [T]SH is the shearing transformation matrix, d, g, i, b, c, f are the shearing factors of y along x, z along x, z along y, x along y, x along z, and y along z, respectively. A shearing is a relative angle deformation between two axes. Therefore, [T]SH has to be symmetric, i.e. b = d, g = c, and i = f. In other words, [T]SH only has three independent variables.
For a point P in its homogeneous coordinate (x, y, z, 1), Eq. (2.8) is applied to define its new position P′ (x′, y′, z′, 1) as
(2.9)
Example 2.3
Given a cube with the size of 1 × 1 × 1 at its origin in Figure 2.13, assume that node 1 is fixed and node 5 is sheared from (1, 1, 1) to (2, 2, 2), and determine the matrix for 3D shearing and the new positions of all vertices after shearing.
Figure 2.13 Example of the 3D shearing transformation of an object. (a) Before transformation. (b) After transformation.
Solution
To determine the shearing matrix, six independent variables must be determined in Eq. (2.9). Since the positions of nodes 1 and 5 are known before and after shearing, Eq. (2.9) is applied to determine the conditions that these variables must satisfy:
(2.10)
Solving Eq. (2.10) gives b = d = c = g = f = i = 0.5.
Figure 2.13b shows the sheared object whose vertices after shearing are determined as
The elements a to j in the reflection transformation matrix of Eq. (2.7) can also be determined for a rotation transformation matrix along an axis in a 3D space. The corresponding matrix can be derived from the rotational matrices for the points in Table 2.1. Figure 2.14 shows the rotational transformation matrices when x, y, and z are chosen as a rotational axis for a rotational angle of θx, θy, and θz, respectively.
Figure 2.14 Rational coordinate transformation of an object. (a) Object in the original position. (b) The x‐axis rotation (θx). (c) The z‐axis rotation (θz). (d)