Transferred from: http://www.cnblogs.com/luweimy/p/4121789.html
Pre-knowledge matrix multiplication
Introduction, go online check it
Two-angle and (differential) formulas
Derivation
Rotation Transformation is generally according to a certain center point, with a certain radius r rotation α
of a certain angle, for the sake of simplicity we give the following scenario
False fixed point A (x, y) want to go through the rotation transformation to reach B (X ', α
y '), known rotation angle and point a coordinate, calculate point B
To calculate point B, calculate his x ' and Y ' components, respectively.
Results:
According to the rule of matrix multiplication, we can introduce
The first row of the left matrix is multiplied by the first column of the right matrix and then added to the first column of the first row of the result matrix.
The second row of the left matrix is multiplied by the first column of the right matrix and then added, which is the element of the first column in the second row of the result matrix
As long as the rotation angle is given, the matrix can be computed, and then the point coordinates can be computed by using the matrix to the left by each point, so that we can transform the coordinates by the matrix.
If it is three-dimensional words also have to add a Z axis, more than one component, the matrix has become a 3x3, but probably the same principle, here only to do a simple principle analysis, if you want to calculate the coordinates of three-dimensional points to transform their own manual bar!!
(turn) rotation matrix derivation