13
3D Transformations Dr. N. VENKAIAH Assistant Professor Mechanical Engineering Department NIT Warangal 506 004 Disclaimer The content presented here is not entirely my own. Some portions are taken from different sources with great regard. This content is solely for class room teaching and not for any commercial use. "Weakness of attitude becomes weakness of character." ~ Albert Einstein

3) 3D Transformations

Embed Size (px)

DESCRIPTION

dfv

Citation preview

Page 1: 3) 3D Transformations

3D Transformations Dr. N. VENKAIAH

Assistant Professor

Mechanical Engineering Department

NIT Warangal 506 004

Disclaimer The content presented here is not entirely my own. Some portions are taken from different sources with great regard. This content is solely for class room teaching and not for any commercial use.

"Weakness of attitude becomes weakness of character." ~ Albert Einstein

Page 2: 3) 3D Transformations

2

Objectives of the Lesson At the end of this lesson, student will be able to

1.  Apply 3D transformations to a given object

Page 3: 3) 3D Transformations

3D Transformation Matrices

TRANSFORMATIONS AND PROJECTIONS 37

2.5 Transformations in Three-DimensionsMatrices developed for transformations in two-dimensions can be modified as per the schema in

Figure 2.13 Translation of a donut along anarbitrary vector

R z =

cos – sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

θ θθ θ

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.25)

Further, using the cyclic rule for the right-handed coordinate axes, rotation matrices about the x-and y-axis for angles ψ and φ can be written, respectively, by inspection as

R Rx y =

1 0 0 00 cos –sin 00 sin cos 00 0 0 1

and =

cos 0 sin 00 1 0 0

–sin 0 cos 00 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

(2.26)

Rotation of a point by angles θ, φ and ψ (in that order) about the z-, y- and x-axis, respectively, isa useful transformation used often for rigid body rotation. The combined rotation is given as

R = Rx(ψ)Ry(φ)Rz(θ ) =

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

cos 0 sin 0

0 1 0 0

– sin 0 cos 0

0 0 0 1

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

θ θθ θ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.27)

We may as well multiply the three matrices to derive the composite matrix though it is easier toexpress the transformation in the above form for the purpose of depicting the order of transformations.Also, it is easier to remember the individual transformation matrices than the composite matrix. Wemay need to rotate an object about a given line. For instance, to rotate an object in Figure 2.14 (a) by45° about the line L ≡ y = x. One way is to rotate the object about the z-axis such that L coincides withthe x-axis, perform rotation about the x-axis and then rotate L about the z-axis to its original location.The combined transformation would then be

Eq. (2.23) for use in three-dimensions. Forinstance, the translation matrix to move a pointand thus an object, e.g. in Figure 2.13, by a vector(p, q, r) may be written as

T =

1 0 0

0 1 0

0 0 1

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.24)

2.5.1 Rotation in Three-DimensionsThe rotation matrix in Eq. (2.4) can be modified toaccommodate the three-dimensional homogenouscoordinates. For rotation by angle θ about the z-axis (the z coordinate does not change), we get

TRANSFORMATIONS AND PROJECTIONS 37

2.5 Transformations in Three-DimensionsMatrices developed for transformations in two-dimensions can be modified as per the schema in

Figure 2.13 Translation of a donut along anarbitrary vector

R z =

cos – sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

θ θθ θ

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.25)

Further, using the cyclic rule for the right-handed coordinate axes, rotation matrices about the x-and y-axis for angles ψ and φ can be written, respectively, by inspection as

R Rx y =

1 0 0 00 cos –sin 00 sin cos 00 0 0 1

and =

cos 0 sin 00 1 0 0

–sin 0 cos 00 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

(2.26)

Rotation of a point by angles θ, φ and ψ (in that order) about the z-, y- and x-axis, respectively, isa useful transformation used often for rigid body rotation. The combined rotation is given as

R = Rx(ψ)Ry(φ)Rz(θ ) =

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

cos 0 sin 0

0 1 0 0

– sin 0 cos 0

0 0 0 1

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

θ θθ θ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.27)

We may as well multiply the three matrices to derive the composite matrix though it is easier toexpress the transformation in the above form for the purpose of depicting the order of transformations.Also, it is easier to remember the individual transformation matrices than the composite matrix. Wemay need to rotate an object about a given line. For instance, to rotate an object in Figure 2.14 (a) by45° about the line L ≡ y = x. One way is to rotate the object about the z-axis such that L coincides withthe x-axis, perform rotation about the x-axis and then rotate L about the z-axis to its original location.The combined transformation would then be

Eq. (2.23) for use in three-dimensions. Forinstance, the translation matrix to move a pointand thus an object, e.g. in Figure 2.13, by a vector(p, q, r) may be written as

T =

1 0 0

0 1 0

0 0 1

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.24)

2.5.1 Rotation in Three-DimensionsThe rotation matrix in Eq. (2.4) can be modified toaccommodate the three-dimensional homogenouscoordinates. For rotation by angle θ about the z-axis (the z coordinate does not change), we get

Translation matrix

Rotation about z-axis (z-coordinate does not change)

Rotation about x-axis (x-coordinate does not change)

Rotation about y-axis (y-coordinate does not change)

TRANSFORMATIONS AND PROJECTIONS 37

2.5 Transformations in Three-DimensionsMatrices developed for transformations in two-dimensions can be modified as per the schema in

Figure 2.13 Translation of a donut along anarbitrary vector

R z =

cos – sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

θ θθ θ

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.25)

Further, using the cyclic rule for the right-handed coordinate axes, rotation matrices about the x-and y-axis for angles ψ and φ can be written, respectively, by inspection as

R Rx y =

1 0 0 00 cos –sin 00 sin cos 00 0 0 1

and =

cos 0 sin 00 1 0 0

–sin 0 cos 00 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

(2.26)

Rotation of a point by angles θ, φ and ψ (in that order) about the z-, y- and x-axis, respectively, isa useful transformation used often for rigid body rotation. The combined rotation is given as

R = Rx(ψ)Ry(φ)Rz(θ ) =

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

cos 0 sin 0

0 1 0 0

– sin 0 cos 0

0 0 0 1

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

θ θθ θ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.27)

We may as well multiply the three matrices to derive the composite matrix though it is easier toexpress the transformation in the above form for the purpose of depicting the order of transformations.Also, it is easier to remember the individual transformation matrices than the composite matrix. Wemay need to rotate an object about a given line. For instance, to rotate an object in Figure 2.14 (a) by45° about the line L ≡ y = x. One way is to rotate the object about the z-axis such that L coincides withthe x-axis, perform rotation about the x-axis and then rotate L about the z-axis to its original location.The combined transformation would then be

Eq. (2.23) for use in three-dimensions. Forinstance, the translation matrix to move a pointand thus an object, e.g. in Figure 2.13, by a vector(p, q, r) may be written as

T =

1 0 0

0 1 0

0 0 1

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.24)

2.5.1 Rotation in Three-DimensionsThe rotation matrix in Eq. (2.4) can be modified toaccommodate the three-dimensional homogenouscoordinates. For rotation by angle θ about the z-axis (the z coordinate does not change), we get

TRANSFORMATIONS AND PROJECTIONS 37

2.5 Transformations in Three-DimensionsMatrices developed for transformations in two-dimensions can be modified as per the schema in

Figure 2.13 Translation of a donut along anarbitrary vector

R z =

cos – sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

θ θθ θ

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.25)

Further, using the cyclic rule for the right-handed coordinate axes, rotation matrices about the x-and y-axis for angles ψ and φ can be written, respectively, by inspection as

R Rx y =

1 0 0 00 cos –sin 00 sin cos 00 0 0 1

and =

cos 0 sin 00 1 0 0

–sin 0 cos 00 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

(2.26)

Rotation of a point by angles θ, φ and ψ (in that order) about the z-, y- and x-axis, respectively, isa useful transformation used often for rigid body rotation. The combined rotation is given as

R = Rx(ψ)Ry(φ)Rz(θ ) =

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

cos 0 sin 0

0 1 0 0

– sin 0 cos 0

0 0 0 1

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

θ θθ θ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.27)

We may as well multiply the three matrices to derive the composite matrix though it is easier toexpress the transformation in the above form for the purpose of depicting the order of transformations.Also, it is easier to remember the individual transformation matrices than the composite matrix. Wemay need to rotate an object about a given line. For instance, to rotate an object in Figure 2.14 (a) by45° about the line L ≡ y = x. One way is to rotate the object about the z-axis such that L coincides withthe x-axis, perform rotation about the x-axis and then rotate L about the z-axis to its original location.The combined transformation would then be

Eq. (2.23) for use in three-dimensions. Forinstance, the translation matrix to move a pointand thus an object, e.g. in Figure 2.13, by a vector(p, q, r) may be written as

T =

1 0 0

0 1 0

0 0 1

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.24)

2.5.1 Rotation in Three-DimensionsThe rotation matrix in Eq. (2.4) can be modified toaccommodate the three-dimensional homogenouscoordinates. For rotation by angle θ about the z-axis (the z coordinate does not change), we get

Page 4: 3) 3D Transformations

Rotation about a Given Line We may need to rotate an object about a given line. For instance, to rotate an object by 45° about the line L ≡ y = x.

One way is to: rotate the object about the z-axis such that L coincides with the x-axis, perform rotation about the x-axis and then rotate L about the z-axis to its original location. The combined transformation would then be

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

Page 5: 3) 3D Transformations

Rotation of a Point about a Line TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

Page 6: 3) 3D Transformations

TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

38 COMPUTER AIDED ENGINEERING DESIGN

LL

xz

y

(a) (b)

Figure 2.14 Rotation of an object: (a) about the line y –x = 0 and (b) rotated result

R = Rz(45°)Rx(45°)Rz(−45°)

12

– 12

0 0

12

12

0 0

0 0 1 0

0 0 0 1

1 0 0 0

0 12

– 12

0

0 12

12

0

0 0 0 1

12

12

0 0

– 12

12

0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis tocoincide with the y-axis, perform rotation about the y-axis and then rotate L back to its originallocation. Apparently, transformation procedures may not be unique though the end result would bethe same if a proper transformation order is followed.

To rotate a point P about an axis L having direction cosines n = [nx ny nz 0] that passes through apoint A [p q r 1], we may observe that P and its new location P* would lie on a plane perpendicularto L and the plane would intersect L at Q (Figure 2.15(a)). Transformations may be composedstepwise as follows:

(i) Point A on L may be translated to coincide with the origin O using the transformation TA. Thenew line L′ remains parallel to L.

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy andOUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = √ √( + ) = (1 – )2 2 2n n ny z x . OUyzmakes an angle ψ with the z-axis such that

TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

Rotation of a Point about a Line …

Page 7: 3) 3D Transformations

TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

TRANSFORMATIONS AND PROJECTIONS 39

y

x

O

U

UyzU′z

φd

ψ

Figure 2.15(b) Computing angles from the directioncosines

cos = , sin = ψ ψnd

nd

z y

Rotate OU about the x-axis by ψ to place it on the x-z plane (OU ′) in which case OUyz will coincidewith the z-axis. OU′ makes angle φ with the z-axis such that cos φ = d and sin φ = nx. Rotate OU′ aboutthe y-axis by –φ so that in effect, OU coincides with the z-axis. The two rotation transformations aregiven by

R Rx y=

1 0 0 0

0 cos –sin 0

0 sin cos 0

0 0 0 1

and =

cos(– ) 0 sin(– ) 0

0 1 0 0

–sin(– ) 0 cos(– ) 0

0 0 0 1

ψ ψψ ψ

φ φ

φ φ

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(iii) The required rotation through angle α is then performed about the z-axis using

R z =

cos –sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

α αα α

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(iv) Eventually, OU or line L is placed back to its original location by performing inverse transformations.The complete rotation transformation of point P about L can now be written as

R = TA–1 Rx

–1(ψ) Ry–1(−φ) Rz (α) Ry (−φ) Rx (ψ ) TA (2.28)

Figure 2.16 shows, as an example, the rotation of a disc about its axis placed arbitrarily in thecoordinate system. Note that all matrices being orthogonal, R y

–1(– φ) = Ry(φ), R x–1(ψ)= Rx (– ψ) and

TA–1(– v) = TA(v), where v = [p q r]T.

Figure 2.15(a) Rotation of P about a line L

z

O

x

y

A(p, q, r, s)

QP

P*L (nx, ny, nz, 0)

Rotation of a Point about a Line …

Page 8: 3) 3D Transformations

Scaling

The scaling matrix

40 COMPUTER AIDED ENGINEERING DESIGN

2.5.2 Scaling in Three-DimensionsThe scaling matrix can be extended from that in a two-dimensional case (Eq. 2.18) as

S =

0 0 0

0 0 0

0 0 0

0 0 0 1

µµ

µ

x

y

z

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(2.29)

where µx, µy and µz are the scale factors along x, y and z directions, respectively. For uniform overallscaling, µx = µy = µz = µ.

Alternatively,

S1 =

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 s

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

has the same uniform scaling effect as that of Eq. (2.29). To observe this, we may write

x

y

z

s

x

y

z

x

y

z

s

xsyszs

s*

*

*

1

=

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

=

1

=

1 0⎡

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

00 0

0 1 0 0

0 0 1 0

0 0 0 11

s

s

x

y

z

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.30)

comparing which with Eq. (2.29) for µx = µy = µz = µ yields µ = 1s

. Figure 2.17 shows uniformscaling of a cylindrical primitive.

x

z

y

Figure 2.16 Rotation of a disc about its axis

40 COMPUTER AIDED ENGINEERING DESIGN

2.5.2 Scaling in Three-DimensionsThe scaling matrix can be extended from that in a two-dimensional case (Eq. 2.18) as

S =

0 0 0

0 0 0

0 0 0

0 0 0 1

µµ

µ

x

y

z

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(2.29)

where µx, µy and µz are the scale factors along x, y and z directions, respectively. For uniform overallscaling, µx = µy = µz = µ.

Alternatively,

S1 =

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 s

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

has the same uniform scaling effect as that of Eq. (2.29). To observe this, we may write

x

y

z

s

x

y

z

x

y

z

s

xsyszs

s*

*

*

1

=

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

=

1

=

1 0⎡

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

00 0

0 1 0 0

0 0 1 0

0 0 0 11

s

s

x

y

z

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.30)

comparing which with Eq. (2.29) for µx = µy = µz = µ yields µ = 1s

. Figure 2.17 shows uniformscaling of a cylindrical primitive.

x

z

y

Figure 2.16 Rotation of a disc about its axis

40 COMPUTER AIDED ENGINEERING DESIGN

2.5.2 Scaling in Three-DimensionsThe scaling matrix can be extended from that in a two-dimensional case (Eq. 2.18) as

S =

0 0 0

0 0 0

0 0 0

0 0 0 1

µµ

µ

x

y

z

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(2.29)

where µx, µy and µz are the scale factors along x, y and z directions, respectively. For uniform overallscaling, µx = µy = µz = µ.

Alternatively,

S1 =

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 s

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

has the same uniform scaling effect as that of Eq. (2.29). To observe this, we may write

x

y

z

s

x

y

z

x

y

z

s

xsyszs

s*

*

*

1

=

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

=

1

=

1 0⎡

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

00 0

0 1 0 0

0 0 1 0

0 0 0 11

s

s

x

y

z

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.30)

comparing which with Eq. (2.29) for µx = µy = µz = µ yields µ = 1s

. Figure 2.17 shows uniformscaling of a cylindrical primitive.

x

z

y

Figure 2.16 Rotation of a disc about its axis

40 COMPUTER AIDED ENGINEERING DESIGN

2.5.2 Scaling in Three-DimensionsThe scaling matrix can be extended from that in a two-dimensional case (Eq. 2.18) as

S =

0 0 0

0 0 0

0 0 0

0 0 0 1

µµ

µ

x

y

z

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(2.29)

where µx, µy and µz are the scale factors along x, y and z directions, respectively. For uniform overallscaling, µx = µy = µz = µ.

Alternatively,

S1 =

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 s

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

has the same uniform scaling effect as that of Eq. (2.29). To observe this, we may write

x

y

z

s

x

y

z

x

y

z

s

xsyszs

s*

*

*

1

=

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

=

1

=

1 0⎡

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

00 0

0 1 0 0

0 0 1 0

0 0 0 11

s

s

x

y

z

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.30)

comparing which with Eq. (2.29) for µx = µy = µz = µ yields µ = 1s

. Figure 2.17 shows uniformscaling of a cylindrical primitive.

x

z

y

Figure 2.16 Rotation of a disc about its axis

40 COMPUTER AIDED ENGINEERING DESIGN

2.5.2 Scaling in Three-DimensionsThe scaling matrix can be extended from that in a two-dimensional case (Eq. 2.18) as

S =

0 0 0

0 0 0

0 0 0

0 0 0 1

µµ

µ

x

y

z

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(2.29)

where µx, µy and µz are the scale factors along x, y and z directions, respectively. For uniform overallscaling, µx = µy = µz = µ.

Alternatively,

S1 =

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 s

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

has the same uniform scaling effect as that of Eq. (2.29). To observe this, we may write

x

y

z

s

x

y

z

x

y

z

s

xsyszs

s*

*

*

1

=

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

=

1

=

1 0⎡

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

00 0

0 1 0 0

0 0 1 0

0 0 0 11

s

s

x

y

z

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.30)

comparing which with Eq. (2.29) for µx = µy = µz = µ yields µ = 1s

. Figure 2.17 shows uniformscaling of a cylindrical primitive.

x

z

y

Figure 2.16 Rotation of a disc about its axis

40 COMPUTER AIDED ENGINEERING DESIGN

2.5.2 Scaling in Three-DimensionsThe scaling matrix can be extended from that in a two-dimensional case (Eq. 2.18) as

S =

0 0 0

0 0 0

0 0 0

0 0 0 1

µµ

µ

x

y

z

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

(2.29)

where µx, µy and µz are the scale factors along x, y and z directions, respectively. For uniform overallscaling, µx = µy = µz = µ.

Alternatively,

S1 =

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 s

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

has the same uniform scaling effect as that of Eq. (2.29). To observe this, we may write

x

y

z

s

x

y

z

x

y

z

s

xsyszs

s*

*

*

1

=

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

=

1

=

1 0⎡

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

00 0

0 1 0 0

0 0 1 0

0 0 0 11

s

s

x

y

z

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.30)

comparing which with Eq. (2.29) for µx = µy = µz = µ yields µ = 1s

. Figure 2.17 shows uniformscaling of a cylindrical primitive.

x

z

y

Figure 2.16 Rotation of a disc about its axis

Page 9: 3) 3D Transformations

Shear

TRANSFORMATIONS AND PROJECTIONS 41

Eq. (2.30) uses the equivalence [x y z s]T ≡ ⎡⎣⎢

⎤⎦⎥

1xs

ys

zs

T

since both vectors represent the same

point in the four-dimensional homogeneous coordinate system.

2.5.3 Shear in Three-DimensionsIn the 3 × 3 sub-matrix of the general transformation matrix (2.23), if all diagonal elements includinga44 are 1, and the elements of 1 × 3 row sub-matrix and 3 × 1 column sub-matrix are all zero, we getthe shear transformation matrix in three-dimensions, similar to the two-dimensional case. The genericform is

Sh =

1 0

1 0

1 0

0 0 0 1

12 13

21 23

31 32

sh sh

sh sh

sh sh

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.31)

whose effect on point P is

x

y

z

sh sh

sh sh

sh sh

x

y

z

x sh y sh z

sh x y sh z

sh x sh y z

*

*

*

1

=

1 0

1 0

1 0

0 0 0 1 1

=

+ +

+ +

+ +

1

12 13

21 23

31 32

12 13

21 23

31 32

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎣⎣

⎢⎢⎢⎢

⎥⎥⎥⎥

Thus, to shear an object only along the y direction, the entries sh12 = sh13 = sh31 = sh32 would be 0while either sh21 and sh23 or both would be non-zero.

2.5.4 Reflection in Three-DimensionsGeneric reflections about the x-y plane (z becomes –z), y-z plane (x becomes – x), and z-x plane (ybecomes –y) can be expressed using the following respective transformations:

Rf Rf Rfxy yz zx=

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

, =

1 0 0 0

0 –1 0 0

0 0 1 0

0 0 0 1

and =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.32)

Figure 2.17 A scaled cylinder using different factors: (a) original size, (b) twice the original size,(c) half the original size

Z

YX

(a) (b) (c)

The shear matrix

TRANSFORMATIONS AND PROJECTIONS 41

Eq. (2.30) uses the equivalence [x y z s]T ≡ ⎡⎣⎢

⎤⎦⎥

1xs

ys

zs

T

since both vectors represent the same

point in the four-dimensional homogeneous coordinate system.

2.5.3 Shear in Three-DimensionsIn the 3 × 3 sub-matrix of the general transformation matrix (2.23), if all diagonal elements includinga44 are 1, and the elements of 1 × 3 row sub-matrix and 3 × 1 column sub-matrix are all zero, we getthe shear transformation matrix in three-dimensions, similar to the two-dimensional case. The genericform is

Sh =

1 0

1 0

1 0

0 0 0 1

12 13

21 23

31 32

sh sh

sh sh

sh sh

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.31)

whose effect on point P is

x

y

z

sh sh

sh sh

sh sh

x

y

z

x sh y sh z

sh x y sh z

sh x sh y z

*

*

*

1

=

1 0

1 0

1 0

0 0 0 1 1

=

+ +

+ +

+ +

1

12 13

21 23

31 32

12 13

21 23

31 32

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎣⎣

⎢⎢⎢⎢

⎥⎥⎥⎥

Thus, to shear an object only along the y direction, the entries sh12 = sh13 = sh31 = sh32 would be 0while either sh21 and sh23 or both would be non-zero.

2.5.4 Reflection in Three-DimensionsGeneric reflections about the x-y plane (z becomes –z), y-z plane (x becomes – x), and z-x plane (ybecomes –y) can be expressed using the following respective transformations:

Rf Rf Rfxy yz zx=

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

, =

1 0 0 0

0 –1 0 0

0 0 1 0

0 0 0 1

and =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.32)

Figure 2.17 A scaled cylinder using different factors: (a) original size, (b) twice the original size,(c) half the original size

Z

YX

(a) (b) (c)

TRANSFORMATIONS AND PROJECTIONS 41

Eq. (2.30) uses the equivalence [x y z s]T ≡ ⎡⎣⎢

⎤⎦⎥

1xs

ys

zs

T

since both vectors represent the same

point in the four-dimensional homogeneous coordinate system.

2.5.3 Shear in Three-DimensionsIn the 3 × 3 sub-matrix of the general transformation matrix (2.23), if all diagonal elements includinga44 are 1, and the elements of 1 × 3 row sub-matrix and 3 × 1 column sub-matrix are all zero, we getthe shear transformation matrix in three-dimensions, similar to the two-dimensional case. The genericform is

Sh =

1 0

1 0

1 0

0 0 0 1

12 13

21 23

31 32

sh sh

sh sh

sh sh

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.31)

whose effect on point P is

x

y

z

sh sh

sh sh

sh sh

x

y

z

x sh y sh z

sh x y sh z

sh x sh y z

*

*

*

1

=

1 0

1 0

1 0

0 0 0 1 1

=

+ +

+ +

+ +

1

12 13

21 23

31 32

12 13

21 23

31 32

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎣⎣

⎢⎢⎢⎢

⎥⎥⎥⎥

Thus, to shear an object only along the y direction, the entries sh12 = sh13 = sh31 = sh32 would be 0while either sh21 and sh23 or both would be non-zero.

2.5.4 Reflection in Three-DimensionsGeneric reflections about the x-y plane (z becomes –z), y-z plane (x becomes – x), and z-x plane (ybecomes –y) can be expressed using the following respective transformations:

Rf Rf Rfxy yz zx=

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

, =

1 0 0 0

0 –1 0 0

0 0 1 0

0 0 0 1

and =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.32)

Figure 2.17 A scaled cylinder using different factors: (a) original size, (b) twice the original size,(c) half the original size

Z

YX

(a) (b) (c)

Page 10: 3) 3D Transformations

Reflection Generic reflections about the x-y plane (z becomes –z), y-z plane (x becomes – x), and z-x plane (y becomes –y) can be expressed using the following respective transformations:

TRANSFORMATIONS AND PROJECTIONS 41

Eq. (2.30) uses the equivalence [x y z s]T ≡ ⎡⎣⎢

⎤⎦⎥

1xs

ys

zs

T

since both vectors represent the same

point in the four-dimensional homogeneous coordinate system.

2.5.3 Shear in Three-DimensionsIn the 3 × 3 sub-matrix of the general transformation matrix (2.23), if all diagonal elements includinga44 are 1, and the elements of 1 × 3 row sub-matrix and 3 × 1 column sub-matrix are all zero, we getthe shear transformation matrix in three-dimensions, similar to the two-dimensional case. The genericform is

Sh =

1 0

1 0

1 0

0 0 0 1

12 13

21 23

31 32

sh sh

sh sh

sh sh

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.31)

whose effect on point P is

x

y

z

sh sh

sh sh

sh sh

x

y

z

x sh y sh z

sh x y sh z

sh x sh y z

*

*

*

1

=

1 0

1 0

1 0

0 0 0 1 1

=

+ +

+ +

+ +

1

12 13

21 23

31 32

12 13

21 23

31 32

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎣⎣

⎢⎢⎢⎢

⎥⎥⎥⎥

Thus, to shear an object only along the y direction, the entries sh12 = sh13 = sh31 = sh32 would be 0while either sh21 and sh23 or both would be non-zero.

2.5.4 Reflection in Three-DimensionsGeneric reflections about the x-y plane (z becomes –z), y-z plane (x becomes – x), and z-x plane (ybecomes –y) can be expressed using the following respective transformations:

Rf Rf Rfxy yz zx=

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

, =

1 0 0 0

0 –1 0 0

0 0 1 0

0 0 0 1

and =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.32)

Figure 2.17 A scaled cylinder using different factors: (a) original size, (b) twice the original size,(c) half the original size

Z

YX

(a) (b) (c)

TRANSFORMATIONS AND PROJECTIONS 43

Rf yz =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

The transformations are

A

B*

C*

D*

E*

F*

A

B

C

D

E

F

T

y yz y

T*

= =

0.707 0 – 0.707 0

0 1 0 0

0.707 0 0.707 0

0 0 0 1

–1 0 0

–1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

R Rf R

00

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

×

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

0.707 0 0.707 0

0 1 0 0

– 0.707 0 0.707 0

0 0 0 1

=

–2 0 0 1

–3 0 0 1

–3 2 0 1

–2 2 0 1

–2 2 1 1

–3 2 1 1

T

and the reflected object is shown in Figure 2.18.

Figure 2.18 Reflection of a wedge about a plane at 45° between (– x) and z-axis.

yx

z

45° Reflecting plane

D*

C* F*E*

B*A*

E

D

CF

BA

TRANSFORMATIONS AND PROJECTIONS 41

Eq. (2.30) uses the equivalence [x y z s]T ≡ ⎡⎣⎢

⎤⎦⎥

1xs

ys

zs

T

since both vectors represent the same

point in the four-dimensional homogeneous coordinate system.

2.5.3 Shear in Three-DimensionsIn the 3 × 3 sub-matrix of the general transformation matrix (2.23), if all diagonal elements includinga44 are 1, and the elements of 1 × 3 row sub-matrix and 3 × 1 column sub-matrix are all zero, we getthe shear transformation matrix in three-dimensions, similar to the two-dimensional case. The genericform is

Sh =

1 0

1 0

1 0

0 0 0 1

12 13

21 23

31 32

sh sh

sh sh

sh sh

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.31)

whose effect on point P is

x

y

z

sh sh

sh sh

sh sh

x

y

z

x sh y sh z

sh x y sh z

sh x sh y z

*

*

*

1

=

1 0

1 0

1 0

0 0 0 1 1

=

+ +

+ +

+ +

1

12 13

21 23

31 32

12 13

21 23

31 32

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎣⎣

⎢⎢⎢⎢

⎥⎥⎥⎥

Thus, to shear an object only along the y direction, the entries sh12 = sh13 = sh31 = sh32 would be 0while either sh21 and sh23 or both would be non-zero.

2.5.4 Reflection in Three-DimensionsGeneric reflections about the x-y plane (z becomes –z), y-z plane (x becomes – x), and z-x plane (ybecomes –y) can be expressed using the following respective transformations:

Rf Rf Rfxy yz zx=

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

, =

1 0 0 0

0 –1 0 0

0 0 1 0

0 0 0 1

and =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.32)

Figure 2.17 A scaled cylinder using different factors: (a) original size, (b) twice the original size,(c) half the original size

Z

YX

(a) (b) (c)

TRANSFORMATIONS AND PROJECTIONS 41

Eq. (2.30) uses the equivalence [x y z s]T ≡ ⎡⎣⎢

⎤⎦⎥

1xs

ys

zs

T

since both vectors represent the same

point in the four-dimensional homogeneous coordinate system.

2.5.3 Shear in Three-DimensionsIn the 3 × 3 sub-matrix of the general transformation matrix (2.23), if all diagonal elements includinga44 are 1, and the elements of 1 × 3 row sub-matrix and 3 × 1 column sub-matrix are all zero, we getthe shear transformation matrix in three-dimensions, similar to the two-dimensional case. The genericform is

Sh =

1 0

1 0

1 0

0 0 0 1

12 13

21 23

31 32

sh sh

sh sh

sh sh

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.31)

whose effect on point P is

x

y

z

sh sh

sh sh

sh sh

x

y

z

x sh y sh z

sh x y sh z

sh x sh y z

*

*

*

1

=

1 0

1 0

1 0

0 0 0 1 1

=

+ +

+ +

+ +

1

12 13

21 23

31 32

12 13

21 23

31 32

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎣⎣

⎢⎢⎢⎢

⎥⎥⎥⎥

Thus, to shear an object only along the y direction, the entries sh12 = sh13 = sh31 = sh32 would be 0while either sh21 and sh23 or both would be non-zero.

2.5.4 Reflection in Three-DimensionsGeneric reflections about the x-y plane (z becomes –z), y-z plane (x becomes – x), and z-x plane (ybecomes –y) can be expressed using the following respective transformations:

Rf Rf Rfxy yz zx=

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

, =

1 0 0 0

0 –1 0 0

0 0 1 0

0 0 0 1

and =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

(2.32)

Figure 2.17 A scaled cylinder using different factors: (a) original size, (b) twice the original size,(c) half the original size

Z

YX

(a) (b) (c)

Page 11: 3) 3D Transformations

Reflection about Arbitrary Plane 42 COMPUTER AIDED ENGINEERING DESIGN

For reflection about a generic plane Π having the unit normal vector as n = [nx ny nz 0] and forA [p q r 1] as any known point on it, the modus operandi is similar to the rotation about an arbitraryaxis discussed in section 2.5.1. The steps followed are

(a) Translate Π to the new position Π′ such that point A coincides with the origin using

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(b) Rotate the unit vector n (passing through the origin) on Π′ to coincide with the z-axis. The newposition of Π′ will be Π′′ and the reflecting plane will coincide with the x-y plane (z = 0). Wewould need the following transformations to acccomplish this step:

R Rx

z

x

y

x

y

x

z

x

y

x x

x x

n

n

n

nn

n

n

n

n n

n n=

1 0 0 0

01 –

–1 –

0

01 – 1 –

0

0 0 0 1

, =

1 – 0 – 0

0 1 0 0

0 1 – 0

0 0 0 1

2 2

2 2

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Rf xy =

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

(c) After reflection, the reverse order transformations need to be performed. The completetransformation would be

R T R R = ( ) (– )A–1 –1 –1

x yψ φ Rfxy Ry(−φ) Rx(ψ) TA (2.33)

Example 2.7. The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) andz-axis. Determine the reflection of the wedge.

First, no translation of the reflecting plane is required as it passes through the origin. The directioncosines of the plane are (0.707, 0, 0.707). We may apply Eq. (2.33) directly to get the result.Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

R y (–225 ) =

cos (45 ) 0 sin (45 ) 00 1 0 0

–sin (45 ) 0 cos (45 ) 00 0 0 1

=

0.707 0 0.707 00 1 0 0

–0.707 0 0.707 00 0 0 1

°

° °

° °

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

axis. The steps followed are:

42 COMPUTER AIDED ENGINEERING DESIGN

For reflection about a generic plane Π having the unit normal vector as n = [nx ny nz 0] and forA [p q r 1] as any known point on it, the modus operandi is similar to the rotation about an arbitraryaxis discussed in section 2.5.1. The steps followed are

(a) Translate Π to the new position Π′ such that point A coincides with the origin using

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(b) Rotate the unit vector n (passing through the origin) on Π′ to coincide with the z-axis. The newposition of Π′ will be Π′′ and the reflecting plane will coincide with the x-y plane (z = 0). Wewould need the following transformations to acccomplish this step:

R Rx

z

x

y

x

y

x

z

x

y

x x

x x

n

n

n

nn

n

n

n

n n

n n=

1 0 0 0

01 –

–1 –

0

01 – 1 –

0

0 0 0 1

, =

1 – 0 – 0

0 1 0 0

0 1 – 0

0 0 0 1

2 2

2 2

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Rf xy =

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

(c) After reflection, the reverse order transformations need to be performed. The completetransformation would be

R T R R = ( ) (– )A–1 –1 –1

x yψ φ Rfxy Ry(−φ) Rx(ψ) TA (2.33)

Example 2.7. The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) andz-axis. Determine the reflection of the wedge.

First, no translation of the reflecting plane is required as it passes through the origin. The directioncosines of the plane are (0.707, 0, 0.707). We may apply Eq. (2.33) directly to get the result.Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

R y (–225 ) =

cos (45 ) 0 sin (45 ) 00 1 0 0

–sin (45 ) 0 cos (45 ) 00 0 0 1

=

0.707 0 0.707 00 1 0 0

–0.707 0 0.707 00 0 0 1

°

° °

° °

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

42 COMPUTER AIDED ENGINEERING DESIGN

For reflection about a generic plane Π having the unit normal vector as n = [nx ny nz 0] and forA [p q r 1] as any known point on it, the modus operandi is similar to the rotation about an arbitraryaxis discussed in section 2.5.1. The steps followed are

(a) Translate Π to the new position Π′ such that point A coincides with the origin using

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(b) Rotate the unit vector n (passing through the origin) on Π′ to coincide with the z-axis. The newposition of Π′ will be Π′′ and the reflecting plane will coincide with the x-y plane (z = 0). Wewould need the following transformations to acccomplish this step:

R Rx

z

x

y

x

y

x

z

x

y

x x

x x

n

n

n

nn

n

n

n

n n

n n=

1 0 0 0

01 –

–1 –

0

01 – 1 –

0

0 0 0 1

, =

1 – 0 – 0

0 1 0 0

0 1 – 0

0 0 0 1

2 2

2 2

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Rf xy =

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

(c) After reflection, the reverse order transformations need to be performed. The completetransformation would be

R T R R = ( ) (– )A–1 –1 –1

x yψ φ Rfxy Ry(−φ) Rx(ψ) TA (2.33)

Example 2.7. The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) andz-axis. Determine the reflection of the wedge.

First, no translation of the reflecting plane is required as it passes through the origin. The directioncosines of the plane are (0.707, 0, 0.707). We may apply Eq. (2.33) directly to get the result.Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

R y (–225 ) =

cos (45 ) 0 sin (45 ) 00 1 0 0

–sin (45 ) 0 cos (45 ) 00 0 0 1

=

0.707 0 0.707 00 1 0 0

–0.707 0 0.707 00 0 0 1

°

° °

° °

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

42 COMPUTER AIDED ENGINEERING DESIGN

For reflection about a generic plane Π having the unit normal vector as n = [nx ny nz 0] and forA [p q r 1] as any known point on it, the modus operandi is similar to the rotation about an arbitraryaxis discussed in section 2.5.1. The steps followed are

(a) Translate Π to the new position Π′ such that point A coincides with the origin using

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(b) Rotate the unit vector n (passing through the origin) on Π′ to coincide with the z-axis. The newposition of Π′ will be Π′′ and the reflecting plane will coincide with the x-y plane (z = 0). Wewould need the following transformations to acccomplish this step:

R Rx

z

x

y

x

y

x

z

x

y

x x

x x

n

n

n

nn

n

n

n

n n

n n=

1 0 0 0

01 –

–1 –

0

01 – 1 –

0

0 0 0 1

, =

1 – 0 – 0

0 1 0 0

0 1 – 0

0 0 0 1

2 2

2 2

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Rf xy =

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

(c) After reflection, the reverse order transformations need to be performed. The completetransformation would be

R T R R = ( ) (– )A–1 –1 –1

x yψ φ Rfxy Ry(−φ) Rx(ψ) TA (2.33)

Example 2.7. The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) andz-axis. Determine the reflection of the wedge.

First, no translation of the reflecting plane is required as it passes through the origin. The directioncosines of the plane are (0.707, 0, 0.707). We may apply Eq. (2.33) directly to get the result.Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

R y (–225 ) =

cos (45 ) 0 sin (45 ) 00 1 0 0

–sin (45 ) 0 cos (45 ) 00 0 0 1

=

0.707 0 0.707 00 1 0 0

–0.707 0 0.707 00 0 0 1

°

° °

° °

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

42 COMPUTER AIDED ENGINEERING DESIGN

For reflection about a generic plane Π having the unit normal vector as n = [nx ny nz 0] and forA [p q r 1] as any known point on it, the modus operandi is similar to the rotation about an arbitraryaxis discussed in section 2.5.1. The steps followed are

(a) Translate Π to the new position Π′ such that point A coincides with the origin using

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(b) Rotate the unit vector n (passing through the origin) on Π′ to coincide with the z-axis. The newposition of Π′ will be Π′′ and the reflecting plane will coincide with the x-y plane (z = 0). Wewould need the following transformations to acccomplish this step:

R Rx

z

x

y

x

y

x

z

x

y

x x

x x

n

n

n

nn

n

n

n

n n

n n=

1 0 0 0

01 –

–1 –

0

01 – 1 –

0

0 0 0 1

, =

1 – 0 – 0

0 1 0 0

0 1 – 0

0 0 0 1

2 2

2 2

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Rf xy =

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

(c) After reflection, the reverse order transformations need to be performed. The completetransformation would be

R T R R = ( ) (– )A–1 –1 –1

x yψ φ Rfxy Ry(−φ) Rx(ψ) TA (2.33)

Example 2.7. The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) andz-axis. Determine the reflection of the wedge.

First, no translation of the reflecting plane is required as it passes through the origin. The directioncosines of the plane are (0.707, 0, 0.707). We may apply Eq. (2.33) directly to get the result.Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

R y (–225 ) =

cos (45 ) 0 sin (45 ) 00 1 0 0

–sin (45 ) 0 cos (45 ) 00 0 0 1

=

0.707 0 0.707 00 1 0 0

–0.707 0 0.707 00 0 0 1

°

° °

° °

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

42 COMPUTER AIDED ENGINEERING DESIGN

For reflection about a generic plane Π having the unit normal vector as n = [nx ny nz 0] and forA [p q r 1] as any known point on it, the modus operandi is similar to the rotation about an arbitraryaxis discussed in section 2.5.1. The steps followed are

(a) Translate Π to the new position Π′ such that point A coincides with the origin using

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(b) Rotate the unit vector n (passing through the origin) on Π′ to coincide with the z-axis. The newposition of Π′ will be Π′′ and the reflecting plane will coincide with the x-y plane (z = 0). Wewould need the following transformations to acccomplish this step:

R Rx

z

x

y

x

y

x

z

x

y

x x

x x

n

n

n

nn

n

n

n

n n

n n=

1 0 0 0

01 –

–1 –

0

01 – 1 –

0

0 0 0 1

, =

1 – 0 – 0

0 1 0 0

0 1 – 0

0 0 0 1

2 2

2 2

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Rf xy =

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

(c) After reflection, the reverse order transformations need to be performed. The completetransformation would be

R T R R = ( ) (– )A–1 –1 –1

x yψ φ Rfxy Ry(−φ) Rx(ψ) TA (2.33)

Example 2.7. The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) andz-axis. Determine the reflection of the wedge.

First, no translation of the reflecting plane is required as it passes through the origin. The directioncosines of the plane are (0.707, 0, 0.707). We may apply Eq. (2.33) directly to get the result.Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

R y (–225 ) =

cos (45 ) 0 sin (45 ) 00 1 0 0

–sin (45 ) 0 cos (45 ) 00 0 0 1

=

0.707 0 0.707 00 1 0 0

–0.707 0 0.707 00 0 0 1

°

° °

° °

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

42 COMPUTER AIDED ENGINEERING DESIGN

For reflection about a generic plane Π having the unit normal vector as n = [nx ny nz 0] and forA [p q r 1] as any known point on it, the modus operandi is similar to the rotation about an arbitraryaxis discussed in section 2.5.1. The steps followed are

(a) Translate Π to the new position Π′ such that point A coincides with the origin using

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(b) Rotate the unit vector n (passing through the origin) on Π′ to coincide with the z-axis. The newposition of Π′ will be Π′′ and the reflecting plane will coincide with the x-y plane (z = 0). Wewould need the following transformations to acccomplish this step:

R Rx

z

x

y

x

y

x

z

x

y

x x

x x

n

n

n

nn

n

n

n

n n

n n=

1 0 0 0

01 –

–1 –

0

01 – 1 –

0

0 0 0 1

, =

1 – 0 – 0

0 1 0 0

0 1 – 0

0 0 0 1

2 2

2 2

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Rf xy =

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

(c) After reflection, the reverse order transformations need to be performed. The completetransformation would be

R T R R = ( ) (– )A–1 –1 –1

x yψ φ Rfxy Ry(−φ) Rx(ψ) TA (2.33)

Example 2.7. The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) andz-axis. Determine the reflection of the wedge.

First, no translation of the reflecting plane is required as it passes through the origin. The directioncosines of the plane are (0.707, 0, 0.707). We may apply Eq. (2.33) directly to get the result.Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

R y (–225 ) =

cos (45 ) 0 sin (45 ) 00 1 0 0

–sin (45 ) 0 cos (45 ) 00 0 0 1

=

0.707 0 0.707 00 1 0 0

–0.707 0 0.707 00 0 0 1

°

° °

° °

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

Page 12: 3) 3D Transformations

Example The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2), E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) and z-axis. Determine the reflection of the wedge. Sol. No translation of the reflecting plane is required as it passes through the origin. We may apply reflection sequence developed in the previous slide directly to get the result. Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane. Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

42 COMPUTER AIDED ENGINEERING DESIGN

For reflection about a generic plane Π having the unit normal vector as n = [nx ny nz 0] and forA [p q r 1] as any known point on it, the modus operandi is similar to the rotation about an arbitraryaxis discussed in section 2.5.1. The steps followed are

(a) Translate Π to the new position Π′ such that point A coincides with the origin using

TA =

1 0 0 –

0 1 0 –

0 0 1 –

0 0 0 1

p

q

r

⎢⎢⎢⎢

⎥⎥⎥⎥

(b) Rotate the unit vector n (passing through the origin) on Π′ to coincide with the z-axis. The newposition of Π′ will be Π′′ and the reflecting plane will coincide with the x-y plane (z = 0). Wewould need the following transformations to acccomplish this step:

R Rx

z

x

y

x

y

x

z

x

y

x x

x x

n

n

n

nn

n

n

n

n n

n n=

1 0 0 0

01 –

–1 –

0

01 – 1 –

0

0 0 0 1

, =

1 – 0 – 0

0 1 0 0

0 1 – 0

0 0 0 1

2 2

2 2

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Rf xy =

1 0 0 0

0 1 0 0

0 0 –1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

(c) After reflection, the reverse order transformations need to be performed. The completetransformation would be

R T R R = ( ) (– )A–1 –1 –1

x yψ φ Rfxy Ry(−φ) Rx(ψ) TA (2.33)

Example 2.7. The corners of wedge-shaped block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),E(−1, 2, 2) and F(−1, 2, 3), and the reflection plane passes through the y-axis at 45° between (−x) andz-axis. Determine the reflection of the wedge.

First, no translation of the reflecting plane is required as it passes through the origin. The directioncosines of the plane are (0.707, 0, 0.707). We may apply Eq. (2.33) directly to get the result.Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.Perform reflection about the y-z plane and thereafter, rotate the plane back to its original location.

R y (–225 ) =

cos (45 ) 0 sin (45 ) 00 1 0 0

–sin (45 ) 0 cos (45 ) 00 0 0 1

=

0.707 0 0.707 00 1 0 0

–0.707 0 0.707 00 0 0 1

°

° °

° °

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

TRANSFORMATIONS AND PROJECTIONS 43

Rf yz =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

The transformations are

A

B*

C*

D*

E*

F*

A

B

C

D

E

F

T

y yz y

T*

= =

0.707 0 – 0.707 0

0 1 0 0

0.707 0 0.707 0

0 0 0 1

–1 0 0

–1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

R Rf R

00

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

×

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

0.707 0 0.707 0

0 1 0 0

– 0.707 0 0.707 0

0 0 0 1

=

–2 0 0 1

–3 0 0 1

–3 2 0 1

–2 2 0 1

–2 2 1 1

–3 2 1 1

T

and the reflected object is shown in Figure 2.18.

Figure 2.18 Reflection of a wedge about a plane at 45° between (– x) and z-axis.

yx

z

45° Reflecting plane

D*

C* F*E*

B*A*

E

D

CF

BA

TRANSFORMATIONS AND PROJECTIONS 43

Rf yz =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

The transformations are

A

B*

C*

D*

E*

F*

A

B

C

D

E

F

T

y yz y

T*

= =

0.707 0 – 0.707 0

0 1 0 0

0.707 0 0.707 0

0 0 0 1

–1 0 0

–1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

R Rf R

00

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

×

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

0.707 0 0.707 0

0 1 0 0

– 0.707 0 0.707 0

0 0 0 1

=

–2 0 0 1

–3 0 0 1

–3 2 0 1

–2 2 0 1

–2 2 1 1

–3 2 1 1

T

and the reflected object is shown in Figure 2.18.

Figure 2.18 Reflection of a wedge about a plane at 45° between (– x) and z-axis.

yx

z

45° Reflecting plane

D*

C* F*E*

B*A*

E

D

CF

BA

Page 13: 3) 3D Transformations

Example …

TRANSFORMATIONS AND PROJECTIONS 43

Rf yz =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

The transformations are

A

B*

C*

D*

E*

F*

A

B

C

D

E

F

T

y yz y

T*

= =

0.707 0 – 0.707 0

0 1 0 0

0.707 0 0.707 0

0 0 0 1

–1 0 0

–1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

R Rf R

00

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

×

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

0.707 0 0.707 0

0 1 0 0

– 0.707 0 0.707 0

0 0 0 1

=

–2 0 0 1

–3 0 0 1

–3 2 0 1

–2 2 0 1

–2 2 1 1

–3 2 1 1

T

and the reflected object is shown in Figure 2.18.

Figure 2.18 Reflection of a wedge about a plane at 45° between (– x) and z-axis.

yx

z

45° Reflecting plane

D*

C* F*E*

B*A*

E

D

CF

BA

TRANSFORMATIONS AND PROJECTIONS 43

Rf yz =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

The transformations are

A

B*

C*

D*

E*

F*

A

B

C

D

E

F

T

y yz y

T*

= =

0.707 0 – 0.707 0

0 1 0 0

0.707 0 0.707 0

0 0 0 1

–1 0 0

–1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

R Rf R

00

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

×

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

0.707 0 0.707 0

0 1 0 0

– 0.707 0 0.707 0

0 0 0 1

=

–2 0 0 1

–3 0 0 1

–3 2 0 1

–2 2 0 1

–2 2 1 1

–3 2 1 1

T

and the reflected object is shown in Figure 2.18.

Figure 2.18 Reflection of a wedge about a plane at 45° between (– x) and z-axis.

yx

z

45° Reflecting plane

D*

C* F*E*

B*A*

E

D

CF

BA

TRANSFORMATIONS AND PROJECTIONS 43

Rf yz =

–1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢

⎥⎥⎥⎥

The transformations are

A

B*

C*

D*

E*

F*

A

B

C

D

E

F

T

y yz y

T*

= =

0.707 0 – 0.707 0

0 1 0 0

0.707 0 0.707 0

0 0 0 1

–1 0 0

–1

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

R Rf R

00

0 1 0 0

0 0 1 0

0 0 0 1

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

×

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥

0.707 0 0.707 0

0 1 0 0

– 0.707 0 0.707 0

0 0 0 1

=

–2 0 0 1

–3 0 0 1

–3 2 0 1

–2 2 0 1

–2 2 1 1

–3 2 1 1

T

and the reflected object is shown in Figure 2.18.

Figure 2.18 Reflection of a wedge about a plane at 45° between (– x) and z-axis.

yx

z

45° Reflecting plane

D*

C* F*E*

B*A*

E

D

CF

BA