To use this page, just:
1) Pick an image. Either one of the two "built-in's" or anything else from the web.
2) Adjust the entries of the matrix. It starts out as the identity matrix, which won't change the image at all.
3) Click [try it out]
1) Start with diagonal matrices, like
1.5 0.0 0.0 0.5The above example will stretch the image in the horizontal direction and shrink it vertically. Try putting negative numbers in one or both of the diagonal entries, and explain what happens.
2) Try a matrix with zero's on the diagonal, like
0 1 1 0The above example swaps the x and y axes, so it reflects the image around the line y=x. You can combine this effect with stretching and shrinking, and you can use negative values to change the reflection to a rotation through a right angle. Be sure you understand what happens in each case, and why.
3) Try a rotation matrix, which has the form
cos(θ) -sin(θ) sin(θ) cos(θ)Pick an angle and get out your calculator to compute the matrix values. Finally, you can use trigonometry for something entertaining!
4) Try more general examples. To predict and understand the effect, just remember that the left matrix column is equal to T(1,0) and tells where the x-axis goes; while the right column equals T(0,1) and tells where the y-axis goes. The rest of the image is just pulled along "linearly". You can tell where a pixel will be by using vector addition:
T(x,y) = x T(1,0) + y T(0,1)5) Observe how the determinant of the matrix effects the transformed image. If you haven't already, try a matrix whose determinant is zero. This will squash the image to a line (or just a point), so the transformed image will be invisible! What happens when the determinant is almost zero? What does a large determinat do? Note that the total area of the transformed image will be equal to the area of the original times the absolute value of the determinant. If the determinant is negative, then the "orientation" of the image will be reversed. Text will be hard to read, Tux's paintbrush will move from his left hand to his right.
Final note: if your transformed image is a red circle with an x in the middle, it means the program couldn't find your image, or you gave it a matrix it couldn't handle, or maybe you've found a bug in the software.