cos(theta) | -sin(theta) |
sin(theta) | cos(theta) |
|
|
If theta is 90 degrees, then this becomes:
Translations
Translation means moving the (x,y) point horizontally and vertically by a set number of units. To move the (x,y) point right 2 and up 3 do this:
Homogeneous Coordinates
Here is what we want -- to do transformations in the plane solely by multiplying by matrices.
Here is the problem -- translation involves adding a vector, not multiplying by a matrix.
Here is the solution to the problem -- homogeneous coordinates. This means that we will represent the point (x,y) like this:
It also means that we do each of our matrix transformations (reflection, projection, rotation) like this (reflection around the x axis is used for example):
Here is how we move the (x,y) point by 2 right and 3 up:
This series of matrix multiplications moves rotates (x,y) by 90 degrees, projects the result onto the x axis, and then moves that result right 2 and up 3:
Transformer: the applet
To run the Transformer, click on the button. Instructions are below.
Purpose
You use the applet to create a string of matrix multiplications -- a product -- in homogeneous coordinates.
Then you tell the applet to apply the matrix product against the points of a given figure (shown in black in the coordinate grid in the transformation window).
The idea is to see how your matrices make the figure move.
To make a new matrix in the product
To create a new matrix multiplied to the left, click on New Matrix, click on the cells of the matrix, and fill in the numbers as you wish.
To delete a matrix
To delete a matrix, click on the delete button beneath it.
To see what your product does
Click on the Apply Product button. Then look at the transformation plot to see what happened. The original figure will be drawn in black. The new position of the figure caused by your matrix product will be in red.
To plot a line
One kind of thing that is interesting to do is to do something (like reflect or project) to the figure relative to a line. But you have to see the line first.
To make a line appear, fill in the numbers in the line display as you wish, and click on the Reference Line check box.
To plot a point
It is also fun to do something to the figure (reflect or project) relative to a point. But you need to see the point.
To make a point appear, fill in the numbers in the point display, and click on the Reference Point check box.