Realization of transformation matrix between two coordinate systems

Source: Internet
Author: User

This paper mainly analyzes the coordinate transformation formula from local coordinate system to global coordinate system. The global coordinate system is described first, as shown in Figure 1,o-xyz, the global coordinate system, O-x ' Y ' z ' is the local coordinate system defined in the o-xyz coordinate system, and the relationship between the two coordinate systems is as follows: the z ' axis of this o-x ' Y ' z ' will go through the coordinate origin of the o-xyz coordinate system, Y ' The axis passes through the z-axis of the o-xyz coordinate system, and the X ' axis and the y ' and Z ' axes form the right-hand coordinate system vertically.

Set O ' point in the Xoy plane projection for o ' ', connect oo ', because o ' x ' is perpendicular to oo ' o ' plane, so o ' x ' is perpendicular to oo ', and Oo ' o ' plane is perpendicular to the oxy plane, so o ' x ' is parallel to the Oxy plane. And the angle between O ' X ' and the ox axis is equal to the angle between Oo ' and the y-axis of the o-xyz coordinate system, and the angle is α (which is easy to prove according to the isometric supplementary angle equivalence). Now we need to solve its coordinates in the O-XYZ system based on the coordinates of the model in o-x ' y ' z ', we must solve the transformation matrix from o-xyz to O-x ' y ' z '. The coordinates of the known O ' point in the o-xyz coordinate system are (xo,y0,z0).

Figure 1


To solve the transformation matrix from o-xyz to O-x ' Y ' Z ', you need to perform the rotation operation first, then perform the translation operation, after the rotation operation of the coordinate system relationship should be as shown in Figure 2, o1-x1y1z1 three axes and the o-x ' Y ' in Figure 1 Z ' 's three axes are parallel, and the coordinate origin of the o1-x1y1z1 coincides with the coordinates origin of the o-xyz, and O1-X1Y1Z1 is coincident with the o-x ' Y ' Z ' coordinate system when the panning operation is performed again.

Figure 2

Now the analysis of how to perform rotation on the o-xyz can be transformed to the position of O1-X1Y1Z1, it is already known that O ' x ' and Xoy plane is parallel, then o1x1 and Xoy plane also parallel, and because o1x1 through the Xoy plane of Origin O, So o1x1 in the Xoy plane. And it has been proved that O ' X ' and o-axis angle with OO ' and o-xyz coordinate system Y axis negative half axis angle is equal, due to known o ' point coordinates, so we can find O ' and o-xyz coordinate system Y axis negative half axis angle α, this angle equals the angle between the o1x1 and ox axis in Figure 1-2. In this way, the o-xyz coordinate system is rotated counterclockwise around the z-axis, when the ox axis rotates to the o1x1, then the angle between Oz and o1z1 is rotated around the o1x1 counterclockwise (set to Beta) and the o-xyz is rotated to the o1-x1y1z1 position.

Analyze the position relationship between the full coordinate system and the local coordinate system and what kind of rotation and translation operations are required to analyze the transformation formulas for these rotation and movement operations.

Based on the above analysis, we know that to transform from o-xyz to O-x ' Y ' z ', we need to first rotate the alpha counterclockwise around the Z axis, and then rotate the axis counterclockwise around the X axis by rotating β (the definition above the explanatory parameters of the β), at which point O-xyz will change to O1-X1Y1Z1 and then the O1 coordinates (XO , y0,z0) translates the transformation from o-xyz to O-x ' Y ' Z. Then, according to the translation and rotation matrix in three-dimensional coordinate system described above, the final transformation matrix M can be expressed as:


Attach a PPT that is found on the internet to explain the coordinate transformation, mainly the realization of the transformation matrix.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.