You are on page 1of 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

Objectives of the Lesson


At the end of this lesson, student will be able to
1. Apply 3D transformations to a given object

0
T=
0

r
0 0 1
Eq.
(2.23)
(2.24)
for use in three-dimensions. For
0 1 the translation matrix to move a point
02.5.10 instance,
0 1
Rotation
in Three-Dimensions
and thus
an object,
e.g. incan
Figure
2.13, by to
a vector
The rotation
matrix
in Eq. (2.4)
be modified
0 0
( p, q, r)the
may
be written as homogenous
Figure 2.13 Tran
three-dimensional
2.5.1 Rotation accommodate
in Three-Dimensions
arb
coordinates.
by
angle

about
the
zThe rotation matrix
in Eq. (2.4)For
can rotation
be modified
to
p
1 0 0 Figure
Rotation in Three-Dimensions
(the z coordinate
not change),
we2.13
get Translation of a donut
accommodate theaxis
three-dimensional
homogenous
does

0 1 0 q
arbitrary vector
otation matrixTranslation
in Eq. coordinates.
(2.4) can
be modified
to by angleT=about

For rotation
the z(2.24)
matrix
Figure 2.13
0 1
r of a donut along an
0we Translation
mmodate the three-dimensional
homogenous
axis (the z coordinate
does not change),
get

cos
arbitrary vector
sin
0 0
dinates. For rotation by angle about the z0
0
0
1

sin
cos
0 0
(the z coordinate does not change), we get
0 0

Rsin
z =
cos
0
0
1 0
2.5.1 Rotation
in Three-Dimensions
sin

cos 0 0

Rotation about z-axis

0
0
0
1
rotation
can be modified to

sin
0= 00in
R z matrix
cos The
Eq. (2.4)

0
1
0
Figure 2.13
(z-coordinate does not
change)
accommodate the three-dimensional
homogenous
sin

0 rule for the right-handed

Further,
using
cyclic
coordinate axes, r
cos
coordinates.
the0For
0
0
0
1
rotation
by
angle

about
the
z

(2.25)
R z = and y-axis for angles and can be written, respectively,
by inspecti
0
1 0 does not change), we get
axis 0(the z coordinate
Further, using
coordinate axes, rotation matrices a
the cyclic rule for the 1right-handed
0
0
0
cos
1 respectively,
and y-axis for angles
by
inspection
as
0 and 0 can be0 written,
0 cos sin 0
0
R
=
and
R
=
Rotation
x-axis
cos
ysin
x
cos matrices
0 cos
urther, using the
cyclic about
rule for
the right-handed
about
x- sin
0 coordinate
0 0 axes,
0sin rotation
0the
sin
00 0
1
0 0 0
(x-coordinate
does
not change)
0 cos sin
0
1 sin
1 cos 0 00 0
respectively,
0
y-axis for angles
and can
be written,
by
inspection
as

R x = 0 sin cos 0 and RR


y z= = sin 0 cos 0
that
0 order) about
0
1 z-,0
Rotation
of a point by
angles
, sin
and
0(in
the

1
0
0
0

cos
0

0
0
1
0
0
0
1
body
0 transformation
a
useful
used
often
for
rigid
rotation.
The
combin
0
0
0 1
sin 0
y-axis
0 cos
0
1
0
0
Rotation
about
R x = 0 sinRotation
anglesRy, =and
(in that
order)
about
and x-axis, resp
the z-, y-(2.26)
sin
cosofa point
0 by and

0
cos
0
Further,
using
thebody
cyclic
coordinate
0rule forThe
0theright-handed
0 cos rotation
0 sin is giv
0 a
(y-coordinate
does
not change)
1 rotation.
transformation
often for
combined
used
0 a useful
rigid
0
0
0
1
0
0
1

and y-axis for angles and can be written,

0 cos sin 0 respectively,


0
1 0 by 0ins
0 cos 0 sin 0 cos sin 0
1 y(0about
0= z-,
R =that
Rx(order)

)Rz( )the
)R
otation of a point by angles , and (in
and
0 x-axis,
cos 0 respectively,
0 0 sin is
0 cos 0co
10y-sin

3D Transformation Matrices

Rotation about a Given Line


38

38

COMPUTER AIDED ENGINEERING DESIGN

COMPUTER AIDED ENGINEERING DESIGN

We may need to rotate an object


about a given line. For instance, to y
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 thez x-axis,
perform rotation about the x-axis
Figure 2.14

(a)

(a)

(b)

(b)

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

and then rotate L about the z-axis to


its original location.

1 1
2
The combined transformation would 2
1
1
then be
2
2
R = Rz(45)Rx(45)Rz(45)
R = Rz(45)Rx(45)Rz(45)

0
0

0
0

0 10 1
2

0 10 0
2

1 0 0
0

0 1 0

1
01
0 00 10 0 2
2

1 1 0 1 1
11
1
0

0
0
2
2

22
22
2
1
1 0
10
10

0 2 1 20 0
2
2

0
0 1 0
0

0
0
0 1 0 0

10
2

00 0



00 0



10 0


0 1
1

1
2
1
2

1
2
1
2

and the result is shown in Figure 2.14 (b). An alternate way is to rotate the line about the z-axis to

Figure 2.14

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

Rotation of a Point about a Line


11 1 1 0 0 0 01 1
22

22


1 1 0 0 0 00 0
11
22

22
(45)R
(45)R
(45)
R R= =RR
(45)R
(45)R
(45)

P*
z
x
z

z
x

0
0 0 P1 1 0 0 0
00

z


0 0 0 0 1 10 0
00

0 0 0 0 1
2

1 1 1 10 0 1

2L (n2x, ny,2nz, 0)
2 2

1 1 1 1 0
0 0
2 2 2 2

0 0 0 0 1 1 0
0 0

11
22
11
22
00

0 0

0 0 0 0

2
TRANSFORMATIONS
AND PROJEC

01 0 0 0

z
10 0 1 0

Uyz
U

00 1 0 1 d

U
and the result is shown in Figure 2.14 (b).
way is to rotate the line about the z-axis to
q,An
r,alternate
s)alternate
and
the result is shown in Figure 2.14 A(p,
(b).An
way is to rotate the line about the z-axis to
coincide with the y-axis, perform rotation about the y-axis and then rotate L back to its original
coincide with the y-axis, perform rotation about the y-axis and then rotate L back to its original
location. Apparently, transformation procedures may not be unique though the end result would be
location. Apparently, transformation procedures may not be unique though the end result would be
the same if a proper transformation order is followed.
O
the same
if
a
proper
transformation
order
is
followed.
To rotate a point P about an O
axis L having direction cosines n = [nx ny nz 0] that passes through a
To
rotate
a
point
P
about
an
axis
L Phaving
cosines
n = [nlie
0] that
passes through a
x non
y naz plane
point A [p q r 1], we may observe
that
and itsdirection
new location
P* would
perpendicular
point
[p qthe
r 1],
we would
may observe
P and
its new2.15(a)).
locationTransformations
P* would lie onmay
a plane
perpendicular
to LAand
plane
intersectthat
L at
Q (Figure
be composed
to stepwise
L and the
plane would intersect L at Q (Figure 2.15(a)).x Transformations may
be composed
x
as follows:
stepwise
as follows:
(i) Point
A on L may be translated
to coincide
with the
O using
TA. The
Figure 2.15(a)
Rotation
of origin
P about
a line the
L transformation
Figure 2.15(b)
Computing angles from th
(i) Point
on L may
be translated
to coincide with the origin O using the transformationcosines
TA. The
new
line LAremains
parallel
to L.

new line L remains parallel to L.

0
0
p
1
ny
nz

=
,
sin

=
p cos
1
0
0

d
d
1
0
q
0

TA =
1 1 by
0
qplace
0 0the 0x-axis
rto
Rotate OUT about
it on the x-z plane (OU) in which case OUyz wi
A =
with the z-axis.OU
1 1with
r the z-axis such that cos = d and sin = nx. Rotate
0 0 makes
0 0 0angle

the y-axis by so that in effect, OU coincides with the z-axis. The two rotation transform
1
0onto 0the x-y0 and y-z
given L)
byprojected
(ii) The unit vector OU (along
planes, makes the traces OUxy and
OUyz, respectively (Figure 2.15(b)). The magnitude of OUyz is d = ( n y2 + n z2 ) = (1 n x2 ) . OUyz

(ii) The unit vector OU (along L) projected onto the x-y and y-z planes, makes the traces OUxy and

0 1
y
0 p 0
p
0
1

1
0
0

p
1 0 0 p

U
U

A(p,
q,
r,
s)
A(p, q, r,
s)

qO
A(p, q, r, s)
0 0 1 q00 1 q 0

0
1
0
1
0

q
O
TA = TA =

T
=
TAA =
O
0
0 01 0 r 1

r
O
O
00 00 1 1 Orr

y
O

0
0

y
0
0
1
0
0
1

O
O
00 00 0 0 1 1
O
x
x x
(ii) The unit vector OU (alo
y
y
x
y
(ii)
unitOU
vector
OU
L)(along
projected
onto
the
x-y
and
y-zx-y
planes,
makes
the
traces
OU
and
(ii)
The
unit
vector
L)x-y
projected
onto
the
and
y-z
planes,
makes
the
traces OUxy(Figure
and 2.1
OU
, xy
respectively
(ii) TheFigure
unitThe
vector
(along
L) (along
projected
onto
and
y-zFigure
planes,
makes
the
traces
OU
and
2.15(a)
Rotation
of OU
Pofabout
athe
line
L
2.15(b)
Computing
angles
from
the
direction
yzthe
xy
x
x
Figure
2.15(a)
Rotation
P
about
a
line
L
Figure
2.15(b)
Computing
angles
from
direction
2
2
2
i) The
unit
vector
OU
(along
L)
projected
onto
the
x-y
and
y-z
planes,
makes
the
traces
OU
and
x
x
x
2
2
2
xy
OUyz, respectively
(Figurex (Figure
2.15(b)).
The magnitude
of
OU
=) =cosines
. OU
(n(1
=OU
nnz x)) =
y +
z2 )) .
yz n x
OUyz
, respectively
2.15(b)).
The
magnitude
ofdn2z2OU
is
OUyzthe z-a
( n2(1
(1angle
) . with
OUyz2.15(a)
, respectively
(Figure
2.15(b)).
The
magnitude
ofL OU
is
d =2.15(b)
(yzn y2is
+
dnn=
an
ydirection
yz
x
yzFigure
yz +makes
2cosines
gure
Rotation
of
P
about
a
line
L
Figure
2.15(b)
Computing
angles
from
the
direction
Figure
2.15(a)
Rotation
of
P
about
a
line
Computing
angles
from
the
,
respectively
(Figure
2.15(b)).
The
magnitude
of
OU
is
d
=
.
OU

(
n
+
n
)
=

(1

n
)
Figure
2.15(a)
Rotation
of
P
about
a
line
L
Figure
2.15(b)
Computing
angles
from
the
direction
makes
an
angle
with
z-axis
such
thatsuch that
y
z
x
z makes an
yz
yz
anglemakes
angle
withan
the
z-axisthe
thatthe
such
with
z-axis
cosinescosines
cosines
es an angle with the z-axis such that
n yn y
nz nz
cosncos
=zn y= , ,sinsin
==
ny
nz
y n
n z cos
d
d
dd
cos cos
=
, = sin
=

=
,
sin

=
, sin =
y

Rotation of a Point about a Line

dd

Rotate OU about the x-axis by to place it on the x-z plane (OU) in which case OU will coincide

Rotate
OU
about
theplace
x-axis
x-z
toplane
placeit(OU)
it on
x-zcase
plane
(OU)
incase
which
OUyz
yz will coincide
teRotate
OU about
x-axis
byabout
to
itplace
onby
the
inthe
which
OU
coincide
Rotate
x-axis
by
to
place
on
the
x-z
plane
(OU)
inwill
which
OUyzcase
will coincide
yz
OU the
about
theOU
x-axis
bythe
to
it on
the
x-z plane
(OU)
in which
case
OU
yz will coincide
with
theangle
z-axis.
OU
makes
angle
with
such
cos OU
=d dand
and
nxx.. Rotate
Rotate
about
with
z-axis.
OU
makes
angle
with
the
z-axis
=sin
==nOU
OU
the
z-axis.
OUthe
makes
angle
with
z-axis
such
that
cos
the
=cos
dz-axis
and
sin
cos
=that
nthat
about
with
the
z-axis.
OU
makes
angle
with
the
z-axis
such
=cos
= nxsin
.sin
Rotate
about OU
x.Rotate
with
the
z-axis.
OU
makes
the
with
the z-axis
such
that
=such
dthat
and
sin
=dnand
about
T
RANSFORMATIONS
AND Pabout
ROJECTIONS
x. Rotate OU
the
y-axis
by

so
that
in
effect,
OU
coincides
with
the
z-axis.
The
two
rotation
transformations
are
-axis
by

so
that
in
effect,
OU
coincides
with
the
z-axis.
The
two
rotation
transformations
are
the
so
that
effect, OU
coincides
withwith
the two
z-axis.
The two
rotation
are
the by
y-axis
so
that
inincoincides
effect,
OU
coincides
therotation
z-axis.
The
two transformations
rotation
are
the y-axis
y-axis
soby
thatby
in
effect,
OU
with
the z-axis.
The
transformations
are transformations
given
by
n by
given by
L (nx, ny , nz, 0)
givengiven
by by

39

P*

) 0)cos(
sin(
1
) 0) 0sin(
0 0 1 001 0 00 0 P 00cos(
) 0 0 sin(
0 cos(
z )
0cos(
01
) 0 ) sin(
1
0
0
0
cos(
)
0
sin(

0 cos

0z0cos
10 0 00 1 0 0 U 0 )
0 cos
sin 0 0 01
sin

sin
0

0 cos
sin Qand
0
R x = R x =
andsin
R
0 0 11 00
= 0= cos

y =
R
R
=
and
R
=

x
y
y
0

R
and
R
=
cos
) 0 ) ) 0 0 cos( ) 0
) 0 )cos(
ycos(
0 sin
0 cos 0sin(
0 00sin
0sin(
0sin(
x cos

0Rsin=
sin
cos

)
sin( ) 0 cos(

and
R
=
x
y

0
0
0
1
0
0
0
1

0
sin
cos
0

sin(
)
0
cos(
)

y 0
0 0 0 1 0
1
0
0 00 0 10 0 01 1 0
0
0
0 0

0
0
0
0d
0
1
1

Uyz



U
0
0
0
1
0
0
0
A(p,
q,
r,
s)

The
required
rotation
through
angle

is
then
performed
about
the
z-axis
using
(iii) The required
rotation
through
angle
is then
performed
the z-axis
(iii) The
required
rotation
through
angle
is thenabout
performed
aboutusing
the z-axis using
(iii) The required rotation through angle is then performed about the z-axis using
0
(iii) The required rotation
cos through
angle
sin
0 performed
0is0 then
sin
0 0 about the z-axis using
cossin
cos

0 cos
0 sin 0 0
0 0 cos
cos

sin sin cos

sin
0
0

cos
R z = R

Oz =

sin
0
0 0
R
=

0
0
1
0

sin
cos
0
0
0 0 1
0
1 0

z=
R

sin
cos
0
0
0
0 1
0 x
0 R =0 0 00 01 x 00 1 1
z

0
0
1
0
0
0
0
Eventually,
OU
or
line
L
is
placed
back
to
its
original
location
by
performing
inverse
transformations.
Figure
2.15(a)
Rotation
of
P
about
a
line
L
Figure
2.15(b)
Computing angles from the direction
original
(iv) Eventually,
or line L is
placed
back
its original
by performing
transformations.
1 inverse
(iv)OU
Eventually,
OU
or line
L isto
placed
backtolocation
its
location byinverse
performing
transformations.

the 0z-axis0using
sin

cos
(iii) The required rotation through angle is then
performed
about

sin
sin

cos
Rz =

0
sin cos
Rz =
00
0

cos

0
0

Rotation of a Point about a Line


0

1
0

0
00

00
1

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

Rx1(
(
) Rz () Ry ()
1 = T
R = TAR
Rx1(A ) R
))RRz (y)(
R
y
y () Rx ( ) TA
1

Rx ( ) TA (2.28)

(2.28)

Figure
shows,
as an example,
the ofrotation
of a its
disc
axis placed
Figure
2.16 2.16
shows,
as an example,
the rotation
a disc about
axisabout
placeditsarbitrarily
in thearbitrarily in the
1
1
1
R y ( ) = RR
coordinate
system.
Note that
all that
matrices
being orthogonal,
)=
and
coordinate
system.
Note
all matrices
being orthogonal,
RyR(x (
), R) 1
y (
x )(=
y ),(R
x ( )= Rx ( ) and
1 ( v) = T (v), where v = [p q r]T.
TA 1 ( v)A= T (v), where v = [p q r]T.

TA

0
0
0
x
Figure 2.16 Rotation of a disc about its axis
x
Figure
2.16
Rotation of a disc about its axis

2.5.2
Scaling
in
Three-Dimensions
ation of a disc about0its axis y

0
0

0
The
scaling
matrix
can
be
extended
from
that
in
a
two-dimensional
case
(Eq.
2.18)
as

S=
S=
2.5.2 0Scaling
in Three-Dimensions
0Three-Dimensions
0
z
(2.29)
2.5.2 Scaling
in
0

scaling matrix can be extended


0 case0 (Eq. 02.18)

The
from
that
in
a
two-dimensional
as

x
The scaling
can be0extended
from that in a two-dimensional case (Eq. 2.18) as
0 matrix

t in a two-dimensional
case0 (Eq. 2.18)
as1
0
0
0
0

Scaling

x x 0 0 0S =00 0 0 0

0
z
(2.2
0 factors
0
0
he scale
along
x, y and z directions, respectively.
For
uniform
overall

where

and

are
the
scale
factors
along
x
y
z
0 0 y y 0 00 0

. y
0
0
0
1
S
=
0 The
0 scaling matrix

S=
scaling, x = y = z = . (2.29)

0
0
0

z0
0
0
z
(2.29)


0
0
z
(2.29)
Alternatively,
where x, y and z arethe

y and z directions, respectively. For uniform over


0 scale
0factors
0along
1x,

0
0
0
1

0
0
1 1
0 scaling,
0
0x = y = z = .

1
where
y and
z the
are
the scale
factors
x, y zand
z directions,
respectively.
For uniform
overall
Alternatively,
where
x, yx,and
z are
scale
alongalong
x, y and
directions,
respectively.
For uniform
overall
factors

0
1
0
0
g x, y andscaling,
z directions,
respectively.
For
uniform
overall
scaling,

0
S1 =x = x y = y z = z .
S1 =
0
0
0
1
0
0
1
0
Alternatively,
0
Alternatively,

1
0
0
0

0
S
=
0
0
0
s

1 10 00 001 00
0
1
0
0
0
0



0
1
0
0
0
1
0
0

aling1 effect
this,
we may write 0 has0 the0same
s uniform scaling effect as that o
0 as0 that of Eq. (2.29). To observe
S1 = S1 =
0 00 01 10 0

of

Eq. (2.29). To observe this, we may write


effect as that
has the
same uniform
scaling
0
1
0
x
1

x* 1 0 0 0 x
1 0 0 00 0s x x s s 0 00 000 x00 0s s

x 1 0 0 0
y

0 1 has

0
1
0
0
y
*
x
x
x
1
0
0
0
x
*
the
same
uniform
effect
as
that
of
Eq.
(2.29).
To
observe
this,
we
may
write
ysame
y scaling
y
0 has
0 the

s
uniform
scaling
effect
as
that
of
Eq.
(2.29).
To
observe
this,
we
may
write
s
0
0 0
=

we may
=this,
s write
fEq. (2.29). To observe
= sy* 0 1 0 0 y (2.30)
y y
1

y
z
0 0 1 0 z z z 1= z x x 1 = s = 0 zs* 0 0 0 0 1 0 (2.3
1

x0 x 1 1 0
x 1 x * x * 1s 01 000 000z*0xs x00x 0 x1 s 0 szs 0 z00 0 0
z

s
0
0

z
1
0 x 0 0 s s 1s 0 0s 0 x 1 y 1s 0 0 s 0
sy y
0 0 0 1
y*
1
y y
y01 10 01 00 1 0y =y 0y 0y 0 s s =y10 s0 s01 0 0
0 0 0 (2.30)
y=*

0
1
1

0
0 0
=
(2.30)
0z z z= z z s = 1 s z z
= s =
s z* z* 0 00 10 01(2.30)
1
0
comparing
0uniform
01
z for

2.17
. Figure
with
0which
Eq. (2.29)
= zyields
=s with
shows
1 Eq. (2.29) for x =
for
z =
0
0
11z comparing

z x =0 y0=
s

which
Eq.
(2.29)

yields

=
. Figure 2.17 shows unifor
s
1
1
0
0
0
1
z
s a cylindrical
s 01 0 0 0 s s 1 s xs y scaling
s
of
primitive.

s
0
0
0
1
rimitive.
1
s
1 of a cylindrical primitive. 1 1 0 0 0
scaling

1 0 0 0 1

x y z

since both vectors represent the same


Eq. (2.30)
uses the equivalence [x y z s]T
1
2.5.3 Shear
in Three-Dimensions
s s s
2.5.3
Shear
in
Three-Dimensions
In the 3point
3 sub-matrix
of
the
general
transformation
matrix
if all diagonal elements including
in the four-dimensional homogeneous coordinate(2.23),
system.
a44 are 1,
of 1 of
3the
row
sub-matrix
and 3 1 matrix
column(2.23),
sub-matrix
are all zero,
we getincluding
Inand
the the
3 elements
3 sub-matrix
general
transformation
if all diagonal
elements
the shear
transformation
matrix
in three-dimensions,
similar to
the3 two-dimensional
case. The
a44
are Shear
1, andin
theThree-Dimensions
elements
of 1 3 row sub-matrix
and
1 column sub-matrix
aregeneric
all zero, we get
2.5.3
form is In
thethe
shear
matrix
in three-dimensions,
similar
to the
two-dimensional
case.
The generic
3 3transformation
sub-matrix of the
general
transformation matrix
(2.23),
if all
diagonal elements
including
aform
44 areis1, and the elements of 1 3 row sub-matrix and 3 1 column sub-matrix are all zero, we get
1
0to the two-dimensional case. The generic
sh12
shsimilar
13
the shear transformation matrix in three-dimensions,
sh
13
0
sh2312 0sh
11
sh
form is
21

(2.31)
The shear matrix Sh =
sh

1
0
sh
sh31 1sh

1
0
21 sh
32
sh13 23 0
12
(2.31)
Sh =
1 0

sh
sh

0 sh21031 1 032 sh231 0



Sh = 0
(2.31)
0
0

sh31
1
0 1
sh32
whose effect on point P is

0
0
0
1
whose effect on
point
P
is

sh12 sh13 0 x x + sh12 y + sh13 z


x* 1
whose effect ony*point
y 0 shx x + yx ++ sh

Pxsh
*is21
sh23
1 1 shsh

12zy + sh13 z
2312 0 sh13
21
=
=

x
*
x
+
sh
y
+
sh
1
0
x
sh
sh
1 1 013
sh23z 0 shy31x + sh
z* ysh
* 31 shsh
sh3221
23 z
12yx + zy +
13 zsh
3221 12

z
0 y =
y* = sh
sh
x
+
y
+
sh
1
sh
21 31
0sh32 123
1sh31 x + sh
32 y + z
1 z*0= 0sh
11 0 z= 21
23
31 sh32
x + sh32 y + z
z*1 sh
1
0
0 1 0 0 1 z 1 sh31

the y direction, the entries


sh = sh = sh = sh would be 0
along
Thus, to shear an object only
0
0
1 1 12
131
31 32
1 0
while either
and shan
or bothonly
would
be non-zero.
23 object
Thus,shto21 shear
along
the y direction, the entries sh = sh = sh = sh would be 0

Shear

12

13

31

32

Thus,
shearshan object
only along the y direction, the entries sh12 = sh13 = sh31 = sh32 would be 0
while to
either
21 and sh23 or both would be non-zero.
Reflection
Three-Dimensions
while
either in
sh21
and sh23 or both would be non-zero.

2.5.4
Generic2.5.4
reflections
about the
x-y plane (z becomes z), y-z plane (x becomes x), and z-x plane (y
Reflection
in Three-Dimensions
2.5.4
Reflection
in Three-Dimensions
becomes
y) can
be expressed
using
the
following
respective
transformations:
Generic
reflections
about
the
x-y
plane
(z
becomes
z),
y-z plane (x becomes x), and z-x plane (y
Generic reflections about the x-y plane (z becomes z), y-z plane (x becomes x), and z-x plane (y
becomesy)
y)can
canbebeexpressed
expressedusing
using
the
following
respective
transformations:
becomes
the
following
respective
transformations:
1 0 0 0
1 0 0 0
1 0 0 0
0 1 0 0
0 1 0 0
0 1 0 0
0
1
0
0
0
1
0
0
0
0 00 00(2.32)
0 =
1 0 0, Rf
1 0 0 0
Rf zx =
1 1
and
Rf x y =
yz
00 00 0
0 0 00111 0 0 0 0 0 0 00 011 1
0 00 011 001 00 0
(2.32)
, ,Rf

andand
==

Rf = =

(2.32)
Rf
= =
Rf
Rf Rf


11

00

00

00


1
0 1 0


11 111


1 1

Thus,
the
entries
shthe
sh
= sh32the
would
be
00 = sh = sh = sh
12 =
13 =
Thus, to
to shear
shear an
an object
object only
only along
alongThus,
the yytodirection,
direction,
shear anthe
the
object
entries
onlysh
shalong
= direction,
sh31
would
entries
be sh
12 = sh
13 y
31 = sh32
12
13
31
while
either
sh
and
sh
or
both
would
be
non-zero.
21
23
while either sh and sh or both would
while either
be non-zero.
sh and sh or both would be non-zero.
21

23

Reflection
21

23

2.5.4
2.5.4 Reflection
Reflection in
in Three-Dimensions
Three-Dimensions
2.5.4 Reflection in Three-Dimensions
Generic
reflections
about
the
x-y
plane
(z
z),
y-z
plane
(x
becomes
x),
and
z-x
plane
(y
Generic
reflections
about
the
x-y
plane
(z
becomes
z),
plane
becomes
x),x),
and
plane
(y(x becomes x), an
Generic reflections about the x-y plane
Generic
(z becomes
becomes
reflections
z),
about
y-zy-z
plane
the
x-y
(x(x
plane
becomes
(zTRANSFORMATIONS
becomes
and
z),
z-xz-x
y-z
plane
plane
(y
AND
P
ROJECTIONS
43
becomes
y)
can
be
expressed
using
the
following
transformations:
becomes
can
expressed
using
following
transformations:
becomes
y)y)
can
bebe
expressed
using
becomes
thethe
following
y) canrespective
respective
berespective
expressed
transformations:
using the following respective transformations:

11
0
0
Rf
Rfxxyy == 0
0

00

00 00
11 1 00 10 00 0000 0 0 0
1
1
1 00 000

0 1 0 0
0 1 0
00 00
0 1 01 0 100 0 0 0
1 00
0
, Rf

0 1
and , Rf
and
Rfyzyzy=z= Rf
= x y =
zx =
=
,
=
Rf
Rf
Rf
zx
yz
1
00 0 00 00 11 0100 10 0
00 00 111
1 00

00 0 00 00 00 0011 0 1 1
00 11

00 00 000

The transformations are


00
11
00
00

T
T
A*
A


B*


C*
C
1
= R y Rf yz R y =

D*
D


E*
E


F*
F

0.707

0.707

0.707

0.707

000

000

000

111

0 0.707 0 1

1
0
0 0

0 0.707 0 0

0
0
1 0

3
3

(2.32)
and
(2.32)Rf zx

0 0 0

1 0 0

0 1 0

0 0 1

1T

1
1

1
0
=
0

0
1
0
0

0
0
1
0

A [p q r 1] as
knownApoint
it, the modus
the rotation
reflectionabout
aboutana arbitrary
generic plane having the un
42any
COMPUTER
IDED Eon
NGINEERING
DESIGN operandi is similar to For
A [p q r 1] as any known point on it, the modus operan
axis discussed in section 2.5.1. The steps followed are

For reflection about a generic plane having the unit normal vector
n = [nx ny in
nz section
0] and for
axisasdiscussed
2.5.1. The steps followed are

(a) Translate
toasthe
position
such
thatoperandi
point Aiscoincides
with
the origin
A [p q
r 1]
anynew
known
point on
it, the
modus
similar to the
rotation
about anusing
arbitrary

Reflection about Arbitrary Plane

(a) Translate to the new position such that p

axis discussed
section 2.5.1. The steps followed are
42 42COMPUTER
AIDED
Ein
NGINEERING DESIGN
COMPUTER
AIDED
ENGINEERING DESIGN
0 that
0 point
pA coincides with the origin using
1 such
(a) Translate to the new position
0 1 0
normal
q
42 For
COMPUTER
Aabout
IDED
ENGINEERING
D
ESIGN
For
reflection
a generic
plane

having
the
unit
vector
reflection
about
a generic
plane
having
the
unit
normal
vectorasasnn == [n
[nxx nnyy nnzz 0]
0] and
and for
for

TA =
1
0
0

A [pCAOMPUTER
q[pr 1]
any
known
point
on on
it, it,
thethe
0modus
1
risissimilar
modus
q ras
as Eany
known
point
operandi
therotation
rotationabout
about an
an arbitrary
arbitraryTA =
42
A1]
IDED
NGINEERING
DESIGN
00 operandi
similartotothe
1
0

q
For
reflection
about
a
generic
plane

having
the
unit
normal
vector
as
n
=
[n
n
n
0]
and
for

x y z
0
axisaxis
discussed
in section
2.5.1.
The
steps
T
=followed
discussed
in section
2.5.1.
The
steps
are1
A
0followed
0are

axis.
0
0
1

A
[p
q
r
1]
as
any
known
point
on
it,
the
modus
operandi
is
similar
to
the
rotation
about
For reflection about a generic plane having the unit normal vector as n = [nx ny nz 0] and
for an arbitrary

steps
followed
Translate
point
to
the
new
position

such
with
discussed
in
section
2.5.1.
The
steps
followed
are
Aaxis
[p (a)
qThe
r 1]
as any
known
it,
the
modus
operandi
issuch
topoint
the
rotation
about an arbitrary
0 that
0that
0point
1AA
(a)
Translate
are:
toonthe
new
position
coincides
withthe
theorigin
origin using
using
similar
coincides

1
0

0
0

1
0

Rotate
the unit
vector
(passing
through
the origin) on to coincide with the z-axis. The new
axis (b)
discussed
in section
2.5.1.
The nsteps
followed
are
(b) Rotate the unit vector n (passing through the ori
(a) Translate
Rotate
to
new
position

such
that point
A will
coincides
with
the origin
position(b)of
the
will
be

andnthe
reflecting
plane
coincide
with
the
x-y
plane
(zwill
=new
0).
We
the
unit
vector
(passing
through
the
origin)
on

to
coincide
with
theusing
z-axis.
The
position
of

be
and the reflecting pla
(a) Translate to the new position such that point
A
coincides
with
the
origin
using
1
0
0

p
1
0
0

p
to acccomplish
step:
of willtransformations
be and thereflecting
plane will coincide
with the
x-y
plane
(z
=
0).
We
would needposition
the following
this
step: would need the following transformations to ac
p0 0 q q this
1acccomplish
would need the following
transformations
1 0 00 0p 0 1 to
1
0

T T= = 00 q
0
0 1A00 A0 10 0
1
0
0
0
1
q 0 0 1 1
r r
0A = n y 0 0
2
n 1z TA = T

11nnx2 00
n 0 nz
y
r0 0 11

r 01
n0z 0 0 1 0n0y 0
0 0
n x x 00

0
x
0

2
0 1 n2
1 n x2 10 n x2 10 0 0n 1x20 1n x20 1 00
1

n
1
0
x
x

1
0
,
0

, R
Rx =
=
R
,
R x = n
yR=y =
x

n
2

n
n zthrough

0 z-axis.
origin) on
y
n z the
yThe new n z
y
(b)
Rotate
the
unit
vector
n (passing
through
the
tocoincide
coincide
1with
n x2nthe
0
n
00
1with
nxto
(b)Rotate
Rotate
thevector
unit
vector
(passing
on
z-axis.
The
new
xthe
xz-axis.
0 nthrough
0origin)
0
0
0
0
(b)
the
unit
n
(passing
the
origin)
on

to
coincide
with
the
The
new

(b) Rotate
the unitof
vector
n (passing
through
origin)
on
towill
coincide
with with
the z-axis.
Theplane
new (z = 0).
2
2
2 1
21the
2 We
2

n
n
position

will
be

and
the
reflecting
plane
coincide
the
x-y
1

n
n
n
n
x
x
0
0
0
1

x
x
position
of

will
be

and
the
reflecting
plane
will
coincide
with
the
x-y
plane
(z
=
0).
We
x
x
position of will
be and the reflecting plane will coincide
the
(z =0 0). We 0

0planethe
will with
will
1

x-ywith
position
of
be
and the
reflecting0 plane
coincide
x-y
plane (z =0).
We

0
0
1
would
need
the
following
transformations
to
acccomplish
this
step:

0
0
0
1

would
need need
the following
transformations
to0 acccomplish
thisacccomplish
step:
0the following
0
1 to

would
transformations
this step:
would need the following transformations to acccomplish this step:

(c)

01
1
0 10 000n y 0 0 0 0 0 00 0 0 2
1
0
n
1

1 0 0
n x
0 2
1 z 0 0 n1z 0 0 n 0 0 n y 1 nx 0
1

n
0

n
0
0 02n z 0n

2
n
0 n0xx 1 0 0
010Rfxyn1x= 0z 1 0
n x2 y y 0 0 00 11 nx 01 0 n0x2x n 0
x
0
0

2
2

Rx =
02, 1Ry =n

2 0
21 0 n 1

1Rf xy 0= 0
0
Rf x y 0=R = ny 1 1n0
0
1
0
x nnx2z x 1 0n1x n x2 x
0
1

0
n
n

0
0
1
0

x
x
0
1
0
0

x0 02
y =
RR

01n0y 02 0
1 n , R y,=, RR =
x = =
2

x 0
1 n0x y n y 1 n x n z n z z0 00 0yn x 0 n0n x 1 1 0n0x2 0110nn2x 0 000
1

x
x
0
0
0
1
(c)
0 After
0
0 0 1 n x21 02the
n1 x2 1order
to 0be0 performed.
2nx2transformations
n x21reverse
0need
0 0 The
1 0complete 1
reflection,
1

n
n
would
0 (c) After
0 reflection,
0
1

the1 reverse order transforma


transformation
0x beorder
01x
0 0 the
0 reverse
0
After reflection,
transformations
need
to
be
performed.
The
complete
00
0
1
1 0 0 0
transformation would be
1 1
1
R
=
T
R
(

)
R
(
) Rfxy Ry() Rx() TA
(2.33)
transformation
would
be
0 1

x
y
A
0
0
Rf x y = 1
1
01 00 0 0
0 1 block are A(0, 0, 2), B(0, 0, 3), C(0, 2, 3), D(0, 2, 2),
R = TA1 R 1
x ( )R y ( ) R
0 1 of 1
0 02.7.1
Example
The corners
wedge-shaped
(2.33)
0R 0= T0A0 R x0 ()R y ( ) Rfxy Ry() Rx() TA
1and
2,02)
100F(1,
E(1,
2, 3),0and the
reflection plane passes through the y-axis at 45 between (x) and
1
0
0
0
1

Rf =

Rf x y

1
0
=
0

= R y Rf yz R y =

D*
D
0.707 0

E*
E
0
0


F*
F

0
0

0 0

1 0

0.707
0

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,22) and
0
0
(c) After reflection, the reverse order transformations need to be performed. The complete
F(1,
2,
3),
and
the
reflection
plane
passes
through
the
y-axis
at
45
between
(x)
and
z-axis.

transformation would be
0
0
0
0.707
0 3
0.707

Determine the reflection of the wedge.

1
0
1 1
1
0
R = TA R x ( )R y ( ) Rfxy Ry() Rx() TA
(2.33)

0.707
0
0.707
Sol.

Example 2.7. The


corners of wedge-shaped
block
areisA(0,
0, 2),asB(0,
0, 3), through
C(0, 2, 3),
0 D(0,
02, 2), 0
No translation
of the reflecting
plane
required
it passes
origin.
the

0 3
=

2
0

1 2

E(1, 2, 2) and F(1, 2, 3), and the reflection plane passes through the y-axis at 45 between (x) and
2
1
z-axis. Determine the reflection of the wedge.
We may apply reflection sequence developed in the previous slide directly to get the result.
First, no translation of the reflecting plane is required as it passes
origin.
The direction
and thethrough
reflectedthe
object
is shown
in Figure 2.18.
cosines 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.
Alternatively, rotate the plane about the y-axis for the reflecting plane to coincide with the y-z plane.
Perform
aboutand
thethereafter,
y-z plane rotate
and thereafter,
theitsplane
back
to its original location.
Perform reflection
aboutreflection
the y-z plane
the plane rotate
back to
original
location.
cos (45 )

0
R y (225 ) =
sin (45 )

Rf y z

1
0
=
0

0
1
0
0

0
1

0
0

0
0

1
0

0 0.707 0 0.707 0
1
0
0 C*
0 0
=

0.707
0
0.707
0
0 TRANSFORMATIONS

AND PROJECTIONS

0
0
1
1 0

0
0

B*

D*
F*

43
A*

0 0 1

1T

1
1

D
E*
y

x
z
A

45 Reflecting plane

Figure 2.18

The transformations are


A*

sin (45 )
0
cos (45 )
0

0 1 0

Reflection of a wedge about a plane at 45 between ( x) and z

Rf y z

1 0
0
1
=
0 y z 0=
Rf

0
0

The transformations are

0 0
1 0
00 01
1 0
0
0
0 1
0
0

0
0

C*
C
1
0
= R 1

=
y Rf yz R y
D*
D
0.707 0

E*
E
0
0


F*
F

0
0

Example
1
0

The transformations are


T
T
A*
A
T
T


A*
A
B*
B
0.707

B
B*
C*
C
0 1
1
= RC*

C
Rf
R
=
y yz
y
D*

D
1
= R y Rf yz Ry0.707

0=

D*

E*
E
0D 0


E*
E
F*
F

F*

0.707 0 1 0
0.707 0 0.707
0 0 1
0
1 0
0
0.707
0 0 0

0.707 0 0.707
1 0 0
0

0 0

0 1
0
0 0
0 0 1
1 0
0 0 0
0 1

1 0

0 0 0.707

0 0 0

1 0 0.707

0 0 1 0

0.707

0.707

0.707

0

0.707

0.707

1
0 0
0.707
0
0.707 1
0
00.707 0 0

0
0

T
0
0 and1 the
2

0 02 1 0
0 3

3 0 2 03 1 0
0 0.707

0 0 2 0 2 03 1 2


2 = 1
1
1 2

2
2
0.707
0

2 1 1

and the reflected object is shown in Figure 2.18.

0
0
0
0

C*

F*

1T

1
1

C*

F*

0 3

0 3
=

2
0

1 2

D*
C*

F*

0
0
2
2
2
2

D
E*
y

B*

A*

D* x
z E*

0.707

D
E*

reflected object is shown in Figure 2.18.

and the reflected object is shown in Figure 2.18.


D*

D
y

E
x

45 Reflecting plane

You might also like