Docsity

2D Linear Transformations and Matrix Representations, Slides of Computer Graphics

Partial preview of the text

Download 2D Linear Transformations and Matrix Representations and more Slides Computer Graphics in PDF only on Docsity!

Transformations and Matrices

  • Transformations are functions
  • Matrices are functions representations
  • Matrices represent linear transf’s

 2 x 2 Matrices  2 D Linear Transf's

What is a 2D Linear Transf?

Recall from Linear Algebra:

for scalar a and vectors and.

: ( ) ( ) ( ),

x y

Definition T ax y aT x T y  

      

Example: Scale in x by 2

What is the graphical view?

( x 0 , y 0 ) (^2 x 0 ,^ y 0 )

( x 1 , y 1 ) (^2 x 1 ,^ y 1 )

Scale in x by 2

y

x

y

( x 0 , y 0 )

( x 1 , y 1 )

 2 ( x (^) 0  x 1 ), y 0  y 1 

( (^) x (^) 0  x 1 ), y 0  y 1 

 x x y y 

2 ( (^0)  1 ), 0  1

x

y

 2 ( x (^) 0  x 1 ), y 0  y 1 

( (^) x (^) 0  x 1 ), y 0  y 1 

 x x y y 

2 ( (^0)  1 ), 0  1

y

x

Matrix Representation

y

x

y

x 2

Scale in x by 2:

Matrix Representation

y

x

y

x

Scale in y by 2:

Matrix Representation Showing Same

(^ )

0 1

0 1

0 1

0 1

0 1

0 1

y y

x x

y y

x x

y y

x x

What about Rotation?

Is it linear?

Rotate by : 1st^ Quadrant

sin

x

y

( 1 , 0 )

(cos,sin  )

 

cos Docsity.com

Rotate by (^)  : 1st^ Quadrant

( 1 , 0 )  (cos ,sin  )

Rotate by : 2nd^ Quadrant

x

y



 

 cos



sin 

( 0 , 1 )

Rotate by (^)  : 2nd^ Quadrant

( 0 , 1 )  (sin ,cos  )