Computer Graphics 2D Affine Transformation
Computer Graphics 2D Affine Transformation
Presented By
Abbaq Nadeem
Topic
2D Affine transformation
Affine Transformation
4
2D Affine Transformations
y
x
x y
5
Translation
Re-position a point along a straight line
Given a point (x,y), and the translation distance
(tx,ty)
OR P’ = P + T where P’ = x’ p = x T = tx
y’ y ty
6
Translation
How to translate an object with multiple
vertices?
Translate individual
vertices
7
2D Rotation
8
2D Rotation
q
Rotate individual
Vertices
9
2D Scaling
(4,4)
(2,2) Sx = 2, Sy = 2
(2,2)
(1,1)
10
Shearing
11
Finding Affine Transformations
Image of 3 points determines affine transformation
12
Finding Affine Transformations
Image of 3 points determines affine transformation
13
Finding Affine Transformations
Image of 3 points determines affine transformation
r P
p’
q r’
q’
14
Finding Affine Transformations
Image of 3 points determines affine transformation
r P
p’
q r’
q’
15