3. Geometric transformation
• Definition
:- Translation , Scaling , Shearing
• Motivation – Why do we need geometric
transformations in CG?
:- As a viewing aid
:- As a modeling tool
:- As an image manipulation tool
7. Matrix Representation
• Represent a 2D Transformation by a Matrix
• Apply the Transformation to a Point
y
x
dc
ba
y
x
dycxy
byaxx
dc
ba
Transformation
Matrix
Point
8. Matrix Representation
• Transformations can be combined by matrix
multiplication
y
x
lk
ji
hg
fe
dc
ba
y
x
Matrices are a convenient and efficient way
to represent a sequence of transformations
Transformation
Matrix
9. 2×2 Matrices
• What types of transformations can be
represented with a 2×2 matrix?
2D Translation
txxx
tyyy
y
x
ty
tx
y
x
0
0
10. 2×2 Matrices
• What types of transformations can be
represented with a 2×2 matrix?2D
Scaling
ysyy
xsxx
y
x
sy
sx
y
x
0
0
11. 2×2 Matrices
• What types of transformations can be
represented with a 2×2 matrix?
2D Shearing
y
x
shy
shx
y
x
1
1
yxshyy
yshxxx
12. Basic 2D Transformations
• Basic 2D transformations as 3x3 Matrices
1100
10
01
1
y
x
ty
tx
y
x
1100
00
00
1
y
x
sy
sx
y
x
1100
01
01
1
y
x
shy
shx
y
x
Translate
Shear
Scale