The transformation of two-dimensional coordinate system is divided into rotation transformation and transformation.
First, rotation transformation
Assuming that a point P (x, y) in the base coordinate system Xoy is known, the coordinate Origin is O, and the point around O is rotated θ, you can calculate the coordinate value of the dot p in the new coordinate system X ' OY ' (x ', Y '), as shown in:
The key to solving x ' and Y ' is to adhere to the known edges to do the hypotenuse, combined with the use of trigonometric functions can be obtained:
X ' =x cos (θ) +y sin (θ)
Y ' =y cos (θ)-x sin (θ)
So the point p in X ' OY ' is the coordinate value (x ', Y ').
Similarly, if you know the coordinates of P point in coordinate system X ' OY ' (x ', y '), you can obtain the coordinate values of point P in the base coordinate system Xoy:
X=x ' cos (-θ) +y ' sin (-θ)
Y=y ' cos (-θ)-X ' sin (-θ)
By the above two equations can be known: a point P in a coordinate system in a coordinate value (x, y), then the coordinate system around the origin of the coordinates of θ, point P in the new coordinate system of the coordinate values X ' and y ' are:
X ' =x cos (θ) +y sin (θ)
Y ' =y cos (θ)-x sin (θ)
Rotate the θ counterclockwise around the origin of the coordinates, the upper θ value is positive, the clockwise rotation θ, the upper θ value is negative.
Second, translation transformation
The base coordinate system Xoy is known, the coordinate system is translated (A, b) to get a new coordinate system X ' O ' Y ', if a point P (x, y) in the base coordinate system is shifted along with the coordinate system, then the coordinates of P point in the base coordinate system Xoy are (X+A,Y+B).
According to the vector addition can be obtained:
OP=OO '+o ' P ' =t+o ' P '
So the coordinates of the vector OP ' are (x+a,y+b).
Three, Rotary translation transformation
The rotation translation transformation is the superposition of the above two cases, known as the rotation of the coordinate system after the translation of X ' O ' y ' a point in the P ' (x ', y '), to find the coordinate value of P ' in the base coordinate system:
You can first find the coordinate value of P ' in the coordinate system xo ' Y, x ' o ' y ' clockwise rotation θ (when θ should take a negative value) can be transformed into the coordinate system xo ' Y, then the coordinate system xo ' Y is translated (-a,-b) can be transformed into a coordinate system xoy, so you can find the coordinate system X ', y ') in the base coordinate system xoy the coordinate values x, Y, respectively:
X=x ' cos (θ) +y ' sin (θ) +a
Y=y ' cos (θ)-X ' sin (θ) +b
--------------------------------------------------------------------------------------------------------------- --
Transformation of two-dimensional coordinate system