Académique Documents
Professionnel Documents
Culture Documents
Arun Shal U B
Department of Mechanical Engineering
Govt. Engineering College Kozhikode
March 3, 2020
Outline
Homogeneous coordinates
Transformations in Three-Dimensions
Geometric Transformations
Geometric Transformations
Geometric Transformations
2-D Rotation
Consider a rigid body S packed with points Pi (i = 1, . . . , n) and let
a point Pj (xj , yj ) on S be rotated about the z-axis to Pj∗ (xj∗ , yj∗ ) by
an angle θ .
2-D Rotation
Consider a rigid body S packed with points Pi (i = 1, . . . , n) and let
a point Pj (xj , yj ) on S be rotated about the z-axis to Pj∗ (xj∗ , yj∗ ) by
an angle θ .
xj∗ = l cos(θ + α)
= l cos θ cos α − l sin θ sin α
2-D Rotation
Consider a rigid body S packed with points Pi (i = 1, . . . , n) and let
a point Pj (xj , yj ) on S be rotated about the z-axis to Pj∗ (xj∗ , yj∗ ) by
an angle θ .
yj∗ = l sin(θ + α)
= l sin θ cos α + l cos θ sin α
2-D Rotation
Consider a rigid body S packed with points Pi (i = 1, . . . , n) and let
a point Pj (xj , yj ) on S be rotated about the z-axis to Pj∗ (xj∗ , yj∗ ) by
an angle θ .
Pj∗ = RPj
Figure: Rotation in a plane
2-D Rotation
I
Pj∗ = RPj
I Where,
cos θ − sin θ
R=
sin θ cos θ
is the two-dimensional rotation matrix.
I Rotation matrix R is orthogonal
R T R = RR T = I =⇒ R T = R −1
I For S to be rotated by an angle θ ,transformation must be
performed simultaneously for all points Pi (i = 1, . . . , n) such
that the entire rigid body reaches the new destination S * .
ME308 Computer Aided Design & Analysis Lec4 - Geometric Transformations
Transformation of points and line
2-D rotation, translation
Homogeneous coordinates
Scaling and combined transformation
Transformations in Three-Dimensions
I A trapezoidal lamina ABCD lies in the x-y plane with A(6, 1),
B(8, 1), C(10, 4) and D(3, 4). The lamina is to be rotated
about the z-axis by 900 . Determine the new position
A∗ B ∗ C ∗ D ∗ after rotation.
∗ T T
A A
∗
B cos θ − sin θ B
=
C ∗ sin θ cos θ C
∗
D D
cos 90 − sin 90 6 8 10 3
=
sin 90 cos 90 1 1 4 4
∗ T T
A A
∗
B cos θ − sin θ B
=
C ∗ sin θ cos θ C
∗
D D
cos 90 − sin 90 6 8 10 3
=
sin 90 cos 90 1 1 4 4
0 −1 6 8 10 3 −1 −1 −4 −4
= =
1 0 1 1 4 4 6 8 10 3
Translation in Two-Dimensions
xj∗ = xj + p, yj∗ = yj + q
xj∗
x p
= j + =⇒ Pj∗ = Pj + v
yj∗ yj q
I For a planar lamina ABCD with A(3, 5), B(2, 2),C (8, 2) and
D(4, 5) in x-y plane and P(4, 3) a pointin the interior, the
8
lamina is to be translated through v =
5
I For a planar lamina ABCD with A(3, 5), B(2, 2),C (8, 2) and
D(4, 5) in x-y plane and P(4, 3) a pointin the interior, the
8
lamina is to be translated through v =
5
∗ T T T T
A 3 5 8 5 11 10
∗
B 2 2 8 5 10 7
C ∗ = 8 2 + 8 5 = 16 7
D ∗
4 5
8 5
12 10
P∗ 4 3 8 5 12 8
Homogeneous coordinates
Homogeneous coordinates
Homogeneous coordinates
∗
xj 1 0 p xj xj + p
y ∗ = 0 1 q yj = yj + q
j
1 0 0 1 1 1
Homogeneous coordinates
I Translation in terms of homogeneous coordinates can be
expressed as
Pj∗ = TPj
where,
1 0 p
T = 0 1 q
0 0 1
I The rotation relation can be modified as well to express the
result in terms of the homogeneous coordinates,
∗
xj cos θ − sin θ 0 xj
Pj∗ = RPj =⇒ yj∗ = sin θ cos θ 0 yj
1 0 0 1 1
x2 1 0 p x1
P2 = TP1 , y2 = 0 1 q y1
1 0 0 1 1
I P2 = TRP
x2 1 0 p cos θ − sin θ 0 x
y2 = 0 1 q sin θ cos θ 0 y
1 0 0 1 0 0 1 1
I P2 = TRP
x2 1 0 p cos θ − sin θ 0 x
y2 = 0 1 q sin θ cos θ 0 y
1 0 0 1 0 0 1 1
x2 cos θ − sin θ p x
y2 = sin θ cos θ q y
1 0 0 1 1
x2 cos θ − sin θ p cos θ − q sin θ x
y2 = sin θ cos θ p sin θ + q cos θ y
1 0 0 1 1
Lamina ABCD with an inner point P with coordinates (4, 3), (3,
1), (8, 1), (7, 4) and (5, 2) respectively is first rotated through 600
and then translated by (5, 4). In another sequence, the trapezoid is
first translated by (5, 4) and then rotated through 600 . Find the
positions and orientations of the lamina for the two sequence of
transformations.
Case - 1 :
5
Rotation through 600 followed by translation through
4
∗
A B ∗ C ∗ D ∗ P ∗ = TR A B C
D P
1 0 5 0.50000 −0.86603 0.00000 4 3 8 7 5
= 0 1 4 0.86603 0.50000 0.00000 3 1 1 4 4
0 0 1 0.00000 0.00000 1.00000 1 1 1 1 1
Case - 1 :
5
Rotation through 600 followed by translation through
4
∗
A B ∗ C ∗ D ∗ P ∗ = TR A B C
D P
1 0 5 0.50000 −0.86603 0.00000 4 3 8 7 5
= 0 1
4 0.86603 0.50000 0.00000 3 1 1 4 4
0 0 1 0.00000 0.00000 1.00000 1 1 1 1 1
1 0 5 −0.5981 0.6340 3.1340 0.0359 0.7679
= 0 1 4 4.9641 3.0981 7.4282 8.0622 5.3301
0 0 1 1.0000 1.0000 1.0000 1.0000 1.0000
Case - 1 :
5
Rotation through 600 followed by translation through
4
∗
A B ∗ C ∗ D ∗ P ∗ = TR A B C
D P
1 0 5 0.50000 −0.86603 0.00000 4 3 8 7 5
= 0 1 4
0.86603 0.50000 0.00000 3 1 1 4 4
0 0 1 0.00000 0.00000 1.00000 1 1 1 1 1
4.40 5.63 8.13 5.04 5.77
= 8.96 7.10 11.43
12.06 9.33
1.00 1.00 1.00 1.00 1.00
Case - 2 :
5
Translation through followed by rotation through 600
4
0
A B 0 C 0 D 0 P 0 = RT A B C
D P
0.50000 −0.86603 0.00000 1 0 5 4 3 8 7 5
= 0.86603 0.50000 0.00000 0 1 4 3 1 1 4 4
0.00000 0.00000 1.00000 0 0 1 1 1 1 1 1
Case - 2 :
5
Translation through followed by rotation through 600
4
0
A B 0 C 0 D 0 P 0 = RT A B C
D P
0.50000 −0.86603 0.00000 1 0 5 4 3 8 7 5
= 0.86603 0.50000 0.00000
0 1 4 3 1 1 4 4
0.00000 0.00000 1.00000 0 0 1 1 1 1 1 1
0.500 −0.866 0.000 9 8 13 12 10
= 0.866 0.500 0.000 7 5 5 8 6
0.000 0.000 1.000 1 1 1 1 1
Case - 2 :
5
Translation through followed by rotation through 600
4
0
A B 0 C 0 D 0 P 0 = RT A B C
D P
0.50000 −0.86603 0.00000 1 0 5 4 3 8 7 5
= 0.86603 0.50000 0.00000
0 1 4 3 1 1 4 4
0.00000 0.00000 1.00000 0 0 1 1 1 1 1 1
−1.562 −0.330 2.170 −0.928 −0.196
= 11.294 9.428 13.758
14.392 11.660
1.000 1.000 1.000 1.000 1.000
Concatenated Transformations
Translation
Matrix to translate Point-A of the square to origin,
1 0 −1
T1 = 0 1 0
0 0 1
Rotation
Matrix
cos 45 − sin 45 0 0.707 −0.707 0.000
R = sin 45 cos 45 0 = 0.707 0.707 0.000
0 0 1 0.000 0.000 1.000
Translation
Matrix
to translate Point-A back to (1,0),
1 0 1
T2 = 0 1 0
0 0 1
1 0 1 0.707 −0.707 0.000 1 0 −1
= 0 1 0 0.707 0.707 0.000 0 1 0
0 0 1 0.000 0.000 1.000 0 0 1
Reflection
Reflection
Reflection
Reflection
Reflection
−1 0 0 6 8 10 −6 −8 −10
= 0 1 0 1 1 4 = 1 1 4
0 0 1 1 1 1 1 1 1
1 0 p cos θ sin θ 0
TOD R(−θ)Rfy R(θ)TDO = 0 1
q − sin θ cos θ 0 ×
0 0 1 0 0 1
−1 0 0 cos θ − sin θ 0 1 0 −p
0 1 0 sin θ cos θ 0 0 1 −q
0 0 1 0 0 1 0 0 1
1 0 0 cos 25.56 sin 26.56 0 −1 0 0
= 0 1 2 − sin 26.56 cos 26.56 0 0 1 0 ×
0 0 1 0 0 1 0 0 1
cos 26.56 − sin 26.56 0 1 0 0 2 4 3
sin 26.56 cos 26.56 0 0 1 −2 4 3 7
0 0 1 0 0 1 1 1 1
0.400 −1.600 2.200
= 4.800 5.800 7.400
1.000 1.000 1.000
Deformations
Scaling
I A point P(x, y , 1) belonging to the object S can be scaled to a
new position vector P ∗ (x ∗ , y ∗ , 1) using factors µx and µy such
that x ∗ = µx x and y ∗ = µy y
I In matrix form
∗
x µx 0 0 x
y ∗ = 0 µy 0 y = SP
1 0 0 1 1
Scaling
I Non-uniform scaling changes the tangent vector proportionally
while the slope remains unaltered in uniform scaling for
µx = µy .
Shear
I Consider a matrix Shx which when applied to a point
P(x, y , 1) results in
∗
x 1 shx 0 x x + shx y
y ∗ = 0 1 0 y = y = Shx P
1 0 0 1 1 1
Shear
A rectangle with coordinates (3, 1), (3, 4), (8, 4) and (8, 1),
respectively, is subjected to a shear along the y direction with a
factor shy = 1.5. Find the transformed coordinates of the rectangle.
Shear
A rectangle with coordinates (3, 1), (3, 4), (8, 4) and (8, 1),
respectively, is subjected to a shear along the y direction with a
factor shy = 1.5. Find the transformed coordinates of the rectangle.
Coordinates of the rectangle are represented as
3 3 8 8
A B C D = 1 4 4 1
1 1 1 1
0 0 1 1 1 1 1
ME308 Computer Aided Design & Analysis Lec4 - Geometric Transformations
Transformation of points and line
2-D rotation, translation
Homogeneous coordinates
Scaling and combined transformation
Transformations in Three-Dimensions
Shear
A rectangle with coordinates (3, 1), (3, 4), (8, 4) and (8, 1),
respectively, is subjected to a shear along the y direction with a
factor shy = 1.5. Find the transformed coordinates of the rectangle.
Coordinates of the rectangle are represented as
3 3 8 8
A B C D = 1 4 4 1
1 1 1 1
Shear
2 5 5 2
= S(3, 2)T (2, 2)R(−600 )T (−2, −2) 2 2 4 4
1 1 1 1
3 0 0 1 0 2 0.500 0.866 0.000 1 0 −2
= 0 2 0 0 1 2 −0.866 0.500 0.000 0 1 −2 ×
0 0 1 0 0 1 0.000 0.000 1.000 0 0 1
2 5 5 2
2 2 4 4
1 1 1 1
2 5 5 2
= S(3, 2)T (2, 2)R(−600 )T (−2, −2) 2 2 4 4
1 1 1 1
1.500 2.598 −2.196 2 5 5 2
= −1.732 1.000 5.464 2 2 4 4
0.000 0.000 1.000 1 1 1 1
6.000 10.500 15.696 11.196
= 4.000 −1.196 0.804 6.000
1.000 1.000 1.000 1.000
I Scaling:
µx 0 0
S =0 µy 0
0 0 1
I Shearing:
1 shx 0
Sh = shy 1 0
0 0 1
Translation in Three-Dimensions
0 0 0 1
Rotation in Three-Dimensions
Rotation in Three-Dimensions
0 0 0 1
cos φ 0 sin φ 0
0 1 0 0
Ry =
− sin φ 0 cos φ 0
0 0 0 1
Scaling in Three-Dimensions
0 0 0 1
Shear in Three-Dimensions
Reflection in Three-Dimensions
0 0 0 1
Thank You...