In this worksheet, the user will experiment with Linear Transformations and Computer Graphics but now allowing for translations by using Homogeneous Coordinates.
John Travis
Mississippi College
Matrix Transformations
If T:$R^n \rightarrow R^m$ is a Linear Transformations, then $T(x)=Ax$, for some unique matrix $A$. Therefore, one can completely describe a linear transformation using a matrix. For computer graphics, all screen images consist of a discrete collection of points. A linear transformation on these points will cause the image to be distorted in some manner. Some interesting transformations discussed in Linear Algebra include reflections, expansion and contraction, shears, projections and combinations of these. In the experiment below, we will start with the unit square and see what happens when an input transformation acts upon that box. You can enter whatever you want for the matrix $A$ but you might want to utilize one (or a multiplicative product) of the standard transformations from the text.
Click to the left again to hide and once more to show the dynamic interactive window |
|
|
Now, experiment with some transformation matrices that you choose. You can combine transformation but multiplying the simple transformations already discussed above.
Assignment:
|
Click to the left again to hide and once more to show the dynamic interactive window |
The Homogeneous Coordinates of the projected corners: [ 7 3 0 3/2] [ 12 8 0 4/5] [ 1 2 0 9/10] The Homogeneous Coordinates of the projected corners: [ 7 3 0 3/2] [ 12 8 0 4/5] [ 1 2 0 9/10] |
|
For the images above, only the corners were transformed since lines are mapped to lines under linear transformations. This saves time rather than transforming each pixel dot for all the lines in the square. For more general images, each pixel must be submitted to the transformation. For the experiment below, we will start with a general image and apply the same inputs as above.
(The hope is that the student would be able to upload an image on their own to use here.)
Below is under construction. Suggestions are welcome!
Can you figure out how to take this image in Sage and apply the various transformations...
Click to the left again to hide and once more to show the dynamic interactive window |
|
|