using matrices to perform geometric transformations kendalyn paulin

21
Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Upload: aileen-irma-lyons

Post on 24-Dec-2015

229 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Using Matrices to Perform Geometric Transformations

Kendalyn Paulin

Page 2: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Review of Basic Transformations

Translation Reflection Rotation Dilation

Page 3: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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

Page 4: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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:

17

52

00

CC

BB

AA

yx

yx

yx

Page 5: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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.

23

82

34

34

34

34

17

52

00

Page 6: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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”).

dc

ba

Page 7: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

cont

They are usually stated by their height first, then their width. The one below would be a 4x3 matrix.

lkj

ihg

fed

cba

Page 8: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Translation Matrices

Add these matrices to translate figure….

x

x

x

0

0

0

x

x

x

0

0

0Up x units Down x units

Right x units Left x units

0

0

0

x

x

x

0

0

0

x

x

x

Page 9: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Adding Matrices

Add the values of the corresponding positions to each other.

zdyc

xbwa

zy

xw

dc

ba

12

23

13

21

21

02Ex:

Page 10: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Adding Matrices

Can you add two matrices that are different sizes?

32

01

25

12

40+ = ?

Page 11: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Subtracting Matrices

How do you think we can subtract two matrices?

Is it the same process as addition? Why or why not?

Page 12: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Subtracting Matrices

Same as addition, but subtracting instead. Once again, matrices must be of the same size.

zdyc

xbwa

zy

xw

dc

ba

34

21

13

21

21

02Ex:

Page 13: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Original Triangle Dilated by a Factor of 2

Page 14: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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.

214

104

00

17

52

00

*2

Page 15: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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.

dc

ba

dc

ba

*2*2

*2*2*2

02

44

01

22*2Ex:

Page 16: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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.

Page 17: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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.

Page 18: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Example

)*()*()*(

)*()*()*(*

yfxewd

ycxbwa

y

x

w

fed

cba

(2X3) (3X1) (2X1)

*Don’t worry about being able to do this procedure. We will use excel!

Page 19: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

Reflection and Rotation

These transformations will be investigated using Microsoft Excel.

We will review our findings in the next slides.

Page 20: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

What transformation matrices to you multiply to do what?

Image stays the same

Reflect over x axis

Reflect over the y axis

10

01

10

01

10

01

Page 21: Using Matrices to Perform Geometric Transformations Kendalyn Paulin

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

01

10

02

20

20

02