Geometric Transformation
Geometric Transformation
4. Rotate and
5. Copy.
2. Types of Transformations
> This transformation alters the coordinate values of the object. Basic operations are
transformations.
> In this transformation there is no change in either the geometry or the coordinates
of the object. A copy of the object is placed at the desired sight, without changing
Translation
Rotation
Scaling
Reflection/Mirroring.
4
i. Translation - 2D
(4,5) (7,5)
(7,1) (10,1)
Before Translation X Translation by (3,-4) X
x’ = x + dx
y’ = y + dy
x x dx
P P T P P T
y y d y
Homogeniou s Form
x 1 0 d x x
y 0 1 d * y
y
𝐖𝐧𝐞𝐰
𝐬𝐱 =
𝐖𝐨𝐥𝐝
𝐡𝐧𝐞𝐰
𝐬𝐲 =
𝐡𝐨𝐥𝐝
𝐗𝐧𝐞𝐰 = 𝐬𝐱𝐗𝐨𝐥𝐝
𝐘𝐧𝐞𝐰 = 𝐬𝐲𝐘𝐨𝐥𝐝
Cont’d…
Y Y
Types of Scaling:
(4,5) (7,5)
x s x * x
y s y * y
S * P P Homogeniou s Form
x sx 0 0 x
y 0 0 * y
s x 0 x x * s x sx
*
0
s y y y * s y 1 0 0 1 1
iii. Rotation about the origin (2D)
ø Consider rotation about the origin by Θ degrees
r cos
v r sin
r cos
v
r sin
(4.9,7.8)
(2.1,4.9)
(5,2) (9,2)
X X
x*cos y*sin x
x*sin y*cos y
Homogenious Form
R * P P
x cos sin 0 x
cos sin x x *cos y*sin y sin cos 0 * y
*
sin cos y x *sin y*cos
1 0
0 110 1
Cont’d
Cont’d…
Example:
• Rotate the rectangle (0, 0), (2, 0), (2, 2), (0, 2) by 30occw
rectangle.
Summary
3. Homogeneous Coordinates
> In order to represent a translation as a matrix multiplication operation
> Two sets of homogeneous coordinates represent the same point if they
Concatenation of scales
Ex.1: Rotation of object about arbitrary point P (x, y) by θ
(-x, -y)
> Rotate by θ
3D transformation:
dim, Vector.
rotation.
matrixes:.
translate each vertex of each surface and redraw the polygon facets in the
new position.
ii. 3D Rotation
🖝 In general, rotations are specified by a rotation axis and an angle.
🖝 In two-dimensions there is only one choice of a rotation axis that leaves points in
the plane.
🖝 The easiest rotation axes are those that parallel to the coordinate axis.
axis, if we are looking along the positive half of the axis toward the coordinate
origin.
Rotation about Z-axis: Rotation about X-axis:
: For z axis same as 2D rotation:
P′ = Rz(θ) ⋅P P′ = Rx(θ) ⋅P
Cont’d…
𝐏 ′ = 𝐓−𝟏. 𝐑𝐱 𝛉 . 𝐓. 𝐏
iii. 3D Scaling
P′ = S ⋅ P
• Scale about any arbitrary point:
iV. 3D Reflections:
similarly.
Cont’d…
Thank you