1.33k likes | 1.34k Views
Learn how to represent linear transformations using matrices in computer graphics. Explore scaling, rotation, shearing, and translation with practical examples and graphical views. Understand the role of matrices in transforming shapes in a 2D space.
E N D
Transformations I CS5600Computer Graphics by Rich Riesenfeld 27 February 2002 Lecture Set 5
Transformations and Matrices • Transformations are functions • Matrices are functions representations • Matrices represent linear transf’s CS5600
What is a 2D Linear Transf ? Recall from Linear Algebra: CS5600
Example: Scale in x CS5600
Example: Scale in x by 2 What is the graphical view? CS5600
Scale in x by 2 CS5600
Summary on Scale • “Scale then add,” is same as • “Add then scale” CS5600
Matrix Representation Scale in x by 2: CS5600
Matrix Representation Scale in y by 2: CS5600
Matrix Representation Overall Scale by 2: CS5600
What about Rotation? Is it linear? CS5600
Rotate by CS5600
Rotate by : 1st Quadrant CS5600
Rotate by : 1st Quadrant CS5600
Rotate by : 2nd Quadrant CS5600
Rotate by : 2nd Quadrant CS5600
Rotate by : 2nd Quadrant CS5600
Summary of Rotation by CS5600
Summary (Column Form) CS5600
Using Matrix Notation (Note that unit vectors simply copy columns) CS5600
General Rotation by Matrix CS5600
Who had linear algebra? Who understand matrices? CS5600
Off Diagonal Elements CS5600
Example 1 S CS5600
Example 1 S CS5600
Example 1 T(S) CS5600
Example 2 S CS5600
Example 2 S CS5600
T(S) Example 2 CS5600
Summary Shear in x: Shear in y: CS5600
Double Shear CS5600
Sample Points: unit inverses CS5600
Geometric View of Shear in x CS5600
Geometric View of Shear in y CS5600
“Lazy 1” CS5600
Translation in x CS5600
Translation in x CS5600
Homogeneous Coordinates CS5600
Homogeneous Coordinates CS5600
Homogeneous Coordinates Homogeneous term effects overall scaling CS5600
Homogeneous Coordinates An infinite number of points correspond to (x,y,1). They constitute the whole line (tx,ty,t). (tx,ty,t) w = 1 (x,y,1)