Total Directory: http://blog.csdn.net/iloveas2014/article/details/38304477
4.2.2 induction of matrix transformation and its embodiment in matrix
Although there are many types of operations and matrices, it is not difficult to figure out that these transformations are similar to two types: they are multiplied by a 1*2 matrix and a 2*2 matrix:
And
Therefore, matrix contains six variables, A, B, C, D, TX, and Ty. However, Adobe skillfully combines the addition matrix and multiplication matrix into a 3*2 matrix, only retaining multiplication. This reduces the number of matrix operations and facilitates the migration of matrix operations. You must know that there are more than one matrix in ActionScript.
After the merger, two problems are required:
1 3*2 the matrix does not meet the conditions of matrix multiplication. What should I do?
2. How to Implement addition in multiplication?
The first problem is that Adobe uses the method of adding blank columns to complete:
U, V, W completely act as the placeholder, so you can fill in the value of the unit matrix:
What is the value of Z equal? Calculate the matrix above:
We can see that both Tx and ty are added to X and Y respectively. If Z is set to 1, the second problem is solved at the same time.
The following matrix represents the calculation process of matrix.
So far, the structure of matrix has been formed, and it can be used for the basic transformation of 2D graphics. What I have never wondered is why the Adobe help file does not include the horizontal variables A, C, TX, and vertical variables B, d, and ty in the same column, I tried to apply the Matrix Multiplication. Adobe's layout seems to have never been explained. So here I made my own claim to adjust the position of B and C in the Adobe matrix.
Although I have been entangled in this detail for a long time, readers do not need to care about it, because it does not affect our use of the matrix class.
Image programming in actionscript3 games)