Download Using Matrices to Perform Geometric Transformations

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Homogeneous coordinates wikipedia , lookup

Tensor operator wikipedia , lookup

Capelli's identity wikipedia , lookup

Cartesian tensor wikipedia , lookup

Jordan normal form wikipedia , lookup

Linear algebra wikipedia , lookup

Invariant convex cone wikipedia , lookup

Eigenvalues and eigenvectors wikipedia , lookup

Oscillator representation wikipedia , lookup

Determinant wikipedia , lookup

Singular-value decomposition wikipedia , lookup

Rotation matrix wikipedia , lookup

Gaussian elimination wikipedia , lookup

Non-negative matrix factorization wikipedia , lookup

Four-vector wikipedia , lookup

Matrix (mathematics) wikipedia , lookup

Perron–Frobenius theorem wikipedia , lookup

Matrix calculus wikipedia , lookup

Cayley–Hamilton theorem wikipedia , lookup

Matrix multiplication wikipedia , lookup

Transcript
Using Matrices to Perform
Geometric Transformations
Kendalyn Paulin
Review of Basic Transformations




Translation
Reflection
Rotation
Dilation
How do Matrices apply to
Transformations?


Remember we can translate a figure up,
down, left and right.
When we do that we are changing the x and
y coordinates of the original figure
Translating a Figure

Say we have a triangle with coordinates: A(0,0), B(2,5) and C(7,-1)
shown below. The Matrix form would look like this:
 xA
x
 B
 xC
y A  0 0 
y B   2 5 
yC  7  1
Translate

Say you want to translate the figure 4 units to the left and 3 units
up. You can do this by adding the translation matrix to the original
matrix. The result is the final coordinates of the new figure.
0 0   4 3  4 3
2 5    4 3   2 8

 
 

7  1  4 3  3 2
What is a Matrix?
A matrix is a 2D array of numbers which can
have any width and height. The one below
had a height and width of 2. So it is called a
2x2 matrix (said “two-by-two”).
a b 
c d 


cont
They are usually stated by their height first,
then their width. The one below would be a
4x3 matrix.
a
d

g

j
b
e
h
k
c

f
i

l
Translation Matrices

Add these matrices to translate figure….
Up x units
Down x units
0  x 
0 x 
0  x 
0 x 




0  x 
0 x 
Right x units
 x 0
 x 0


 x 0
Left x units
  x 0
  x 0


 x 0
Adding Matrices
Add the values of the corresponding positions to each
other.
a b   w x  a  w b  x 
c d    y z    c  y d  z 

 
 

Ex:
2
 2 0   1 2  3
1  2   3 1   2  1

 
 

Adding Matrices

Can you add two matrices that are different sizes?
1 0 
2  3


+
0  4
2 1 


5  2
= ?
Subtracting Matrices



How do you think we can subtract two
matrices?
Is it the same process as addition?
Why or why not?
Subtracting Matrices

Same as addition, but subtracting instead. Once
again, matrices must be of the same size.
a b   w x  a  w b  x 
c d    y z    c  y d  z 

 
 

Ex:
2 0   1 2 1  2
1  2   3 1  4  3

 
 

Original Triangle Dilated by a Factor of 2
Dilate a figure

In order to dilate a figure, scalar multiplication is
used. To dilate the triangle by a factor of 2, just
multiply the matrix by 2.
0 0   0 0 




2 * 2 5    4 10 
7  1 14  2
Scalar Multiplication

In the scalar multiplication, every entry is multiplied
by a number, called a scalar. In this example the
number being multiplied by is 2.
a b  2 * a 2 * b 
2* 



c d   2 * c 2 * d 
 2  2  4  4

Ex: 2 * 


1
0
2
0

 

Other Dilations

You can also dilate the figure by a fraction,
this will make the triangle smaller. If you
dilate by a factor ½, the triangle will be half
as big as it originally was. You can
investigate this on your own.
Multiplying Matrices



Multiplying matrices will be investigated in a later course. This
lesson will only briefly show multiplication.
Here is what a resulting matrix looks like.
We will use excel to do our multiplication matrices.
Example
a b
d e

(2X3)
w
c     (a * w)  (b * x)  (c * y ) 
*x  


f
(
d
*
w
)

(
e
*
x
)

(
f
*
y
)

 y  
(3X1)
(2X1)
*Don’t worry about being able to do
this procedure. We will use excel!
Reflection and Rotation


These transformations will be investigated
using Microsoft Excel.
We will review our findings in the next slides.
What transformation matrices to you
multiply to do what?
Image stays the same
1 0
0 1 



Reflect over x axis
1 0 
0 1



Reflect over the y axis
  1 0
 0 1



What transformations?

Image dilates by 2

Rotates image 90 degrees
clockwise

Dilates the image by a factor of
2 then rotates the image 90
degrees clockwise
2 0
0 2


0  1
1 0 


0  2
2 0 

