You are on page 1of 27

Geometric Transformations

Dr. Sara Hassan Kamel


Geometric Transformations
 What are geometric transformations?

Shear Rotation

Scaling

Reflection
2 Dr. Sara Hassan Kamel
Geometric Transformations
 Rotation Transformation
 We want a matrix that rotates vectors θ degrees
anti-clockwise.

θ
θ

3 Dr. Sara Hassan Kamel


Geometric Transformations
 Rotation Transformation
 We want a matrix that rotates vectors θ degrees
anti-clockwise.

 1  cos 
T (e1 )  T      
(cosθ, sinθ)


1sinθ

 0   sin 
θ

1cosθ

4 Dr. Sara Hassan Kamel


Geometric Transformations
 Rotation Transformation
 We want a matrix that rotates vectors θ degrees
anti-clockwise.

(-sinθ, cosθ)  0   sin 


T (e2 )  T       
1cosθ

 1   cos 
θ 1

–sinθ 1sinθ

5 Dr. Sara Hassan Kamel


Geometric Transformations
 Rotation Transformation
 We want a matrix that rotates vectors θ degrees
anti-clockwise.
cos  A  [T (e1 ) T (e2 )]
T (e1 )   
 sin  cos  sin 
 
 sin   sin cos 
T (e 2 )   
 cos 
6 Dr. Sara Hassan Kamel
Geometric Transformations
 Shear Transformation
 Horizontal Shear

7 Dr. Sara Hassan Kamel


Geometric Transformations
 Shear Transformation
 Vertical Shear

8 Dr. Sara Hassan Kamel


Geometric Transformations
 Scaling Transformation
 Horizontal Scaling

9 Dr. Sara Hassan Kamel


Geometric Transformations
 Scaling Transformation
 Horizontal Scaling

10 Dr. Sara Hassan Kamel


Geometric Transformations
 Scaling Transformation
 Vertical Scaling

11 Dr. Sara Hassan Kamel


Geometric Transformations
 What does this matrix do?
Reflection through
the x-axis

1 1 1  1 


0  0 2   2
       

0  0    1  1
1   1   2   2 
       

12 Dr. Sara Hassan Kamel


Geometric Transformations
 What does this matrix do?
Reflection through
the x-y line

 x   y
 y   x 
   

13 Dr. Sara Hassan Kamel


Geometric Transformations
 Translation
(2,4) (3,4)

(0,1) (1,1) (2,3) (3,3)

(0,0) (1,0)

Can this be done using matrix multiplication?


14 Dr. Sara Hassan Kamel
Geometric Transformations
 Translation
(2,4) (3,4)

   x   x  2 (2,3) (3,3)
 ?   y    y  3 (0,1) (1,1)
    
(0,0) (1,0)

Can this be done using matrix multiplication?


15 Dr. Sara Hassan Kamel
Geometric Transformations
 Translation
(2,4) (3,4)

1 0 h  x   x  h 
0 1 k   y    y  k  (2,3) (3,3)
     (0,1) (1,1)

0 0 1 1   1 


(0,0) (1,0)

16 Dr. Sara Hassan Kamel


Geometric Transformations
 Translation
(2,4) (3,4)

1 0 h  x   x  h 
0 1 k   y    y  k  (2,3) (3,3)
     (0,1) (1,1)

0 0 1 1   1 


(0,0) (1,0)

17 Dr. Sara Hassan Kamel


Geometric Transformations
 Example 1:
1

0 1 0 1 2

–1

 Two steps:
1. Reflection through the x-axis
2. Translation (shifting) +1 along the x-axis

18 Dr. Sara Hassan Kamel


Geometric Transformations
 Example 1:
1

0 1 0 1 2

–1

1 0 1
0  1 0
 
0 0 1

19 Dr. Sara Hassan Kamel


Geometric Transformations
 Example 1:
1

0 1 0 1 2

–1

1 0 1 0 1
0  1 0 0  0
    
0 0 1 1 1
20 Dr. Sara Hassan Kamel
Geometric Transformations
 Example 1:
1

0 1 0 1 2

–1

1 0 1 1 2
0  1 0 0  0
    
0 0 1 1 1
21 Dr. Sara Hassan Kamel
Geometric Transformations
 Example 1:
1

0 0.5 1 0 1 2

–1

1 0 1 0.5 1.5
0  1 0  1     1
    
0 0 1  1   1 
22 Dr. Sara Hassan Kamel
Geometric Transformations
 Example 2:
1 1

0 1 0 0.5 2

 Two steps:
1. Horizontal scaling (by 2)
2. Horizontal shearing (by 0.5)

23 Dr. Sara Hassan Kamel


Geometric Transformations
 Example 2:
1 1

0 1 0 0.5 2

2 0.5 1 0.5 2 0
0 1   0 1  0 1
     
24 Dr. Sara Hassan Kamel
Geometric Transformations
 Example 2:
1 1

0 1 0 0.5 2

2 0.5  x  2 x  0.5 y 
0 1   y    
    y 
25 Dr. Sara Hassan Kamel
Geometric Transformations
 Example 2:
1 1

0 1 0 0.5 2

2 0.5 0 0 2 0.5 0 0.5


0 1  0  0 0 1  1   1 
         
2 0.5 1 2 2 0.5 1 2.5
0 1  0  0 0 1  1   1 
         
26 Dr. Sara Hassan Kamel
See you next
lecture!

27 Dr. Sara Hassan Kamel

You might also like