Like duffymo has pointed out, Matrix Transformations is nothing more but (pre)multiplying a vector (like a 3d point) by a matrix. However, that is pure mathematics, and hard for some people to visualise.
The best way to understand transformation matrices (at least for me) is to get an example code, get it running, and play around with the numbers. Try to see if you can place an object farther away, or rotated by 45 degrees. Try putting the transformations in different order and see what the results are.
All working? Good.
Once you get a feel of that, and if you're brave enough to tackle the maths, you could take these steps:
First, understand how matrix multiplications work. Some links:
Once you are comfortable with multiplying a matrix by hand, you will get a feel of why transformations are written that way. As you use them, the understanding of matrices will eventually come to you.
Secondly, I always recommend spending an afternoon trying to implement your own Matrix
class and define a few common operations like mul(Vector v)
, transpose()
or even createTranslationMatrix(float x, float y, float z)
. Put in a few tests and see if the results are the same with what you did by hand.
If you've come that far, try implementing your own Perspective Transformation! It's the most amazing thing we never come to appreciate. A useful explanation here:
You will be very proud of yourself once you have accomplished one of the most labourous, yet under-appreciated tasks of implementing a matrix object. Good luck!