The solution of the rotation matrix of the two-dimensional coordinate system (the coordinate system is unchanged and the coordinate system is changed)

1 Rotation around the origin
As shown in the figure below, on the 2-dimensional coordinates, there is a point p(x, y), the length of the straight line op is r, and the angle between the straight line op and the positive direction of the x-axis is a. The straight line op rotates b degrees counterclockwise around the origin to reach p' (s,t) 



s = r cos(a + b) = r cos(a)cos(b) – r sin(a)sin(b) (1.1)
t = r sin(a + b) = r sin(a)cos(b) + r cos(a) sin(b) (1.2) where x = r cos(a) , y = r sin(
a )
into (1.1), (1.2) ,
s = x cos(b) – y sin(b) (1.3)
t = x sin(b) + y cos(b) (1.4)

 


Expressed in determinant as follows:

 

2. Rotation of the coordinate system
In the original coordinate system xoy, rotate theta degrees counterclockwise around the origin to become the coordinate system sot.
Assuming a point p, the coordinates in the original coordinate system are (x, y), and the new coordinates after rotation are (s, t).



oa = y sin(theta) (2.1)
as = x cos(theta) (2.2)
synthesis (2.1), (2.2) 2 formula
s = os = oa + as = x cos(theta) + y sin(theta) 
t = ot = ay – ab = y cos(theta) – x sin(theta)

 

Expressed in determinant as follows:

Guess you like

Origin blog.csdn.net/hy2014x/article/details/107921476