Azimuth and angular displacement in 3D

Source: Internet
Author: User
Tags relative

Azimuth: Direction

Angular displacement

Rotating

Displacement: We know that the position of an object cannot be described by an absolute coordinate system, and the object must be placed in a particular reference system to describe the position of the object. The description position is actually the displacement relative to the given reference point (usually the origin of the coordinate).

Also, the absolute amount cannot be used when describing the orientation of an object. The azimuth is described by rotation relative to the known azimuth, just as the position is relative to the known point. The amount of rotation is called angular displacement. Specifically, we use matrices and four elements to represent "angular displacements", and Orale to denote "azimuth."

In the form of matrices: 3D, one way to describe the azimuth in a coordinate system is to list the base vectors of the coordinate system, which are described in other coordinate systems. These base vectors form a 3*3 matrix and can then be used to describe the orientation in the form of matrices. In other words, a rotation matrix can be used to describe the relative orientation between the two coordinate systems, which is used to convert a vector in one coordinate system to another.

A bit of matrix form:

The rotation of the vector can be done immediately. The most important property of matrix form is to use the matrix to rotate the vector between the object and the inertial coordinate system, which can not be done by other description methods. In order to rotate the vector, the azimuth must be converted into matrix form.

The form of the matrix is used by the graphics API. Affected by the reasons described in the previous section, the graphics API uses matrices to describe the orientation. (API is the application interface, basically, they are the code that implements your communication with the graphics card) when you communicate with the graphics API, you must convert it to a matrix somewhere in the render pipeline.

multiple angular displacement connections. A second advantage of matrix form is the ability to "break" the relationship between nested coordinate systems. For example, if you know the position of a about B, and you know the position of B about C, you can use a matrix to find the position of a about C.

Inverse of the matrix. When the angular displacement is expressed in matrix form, the inverse matrix is the "inverse" angular displacement. Because the rotation matrix is orthogonal, this calculation is simply a matrix transpose operation.

Disadvantages of matrix form: The Matrix takes up more memory. If you need to save a large number of orientations, such as keyframes in an animation sequence, 9 numbers can result in a considerable amount of additional space loss.

Difficult to use. Matrices are not intuitive to humans. There are too many numbers, and they are between 1 and 1. The intuitive way for humans to consider orientation is the angle, and the matrix uses vectors. Through practice, we can get the azimuth that it represents from a given matrix. But this is still much more difficult than Euler's angle, and the rest is not satisfactory. It is almost impossible to construct a matrix that describes arbitrary orientations by hand calculation. In short, the matrix is not the intuitive way of human thought.

The matrix may be morbid. The matrix uses 9 numbers, in fact only 3 numbers are required. In other words, the matrix has 6-step redundancy. The matrix that describes the azimuth must meet the 6 limit conditions. Rows must be unit vectors, and they must be perpendicular to each other.

If you randomly take 9 numbers and form a 3*3-order matrix, it is unlikely that the matrix condition will meet all 6 constraints. Therefore, these 9 numbers cannot form a valid rotation matrix. On the other hand, at least for the purpose of expressing rotation, the structure of the matrix is unreasonable, and such a matrix would be problematic because it could result in numerical anomalies or other unintended behavior.

How does the morbid matrix appear? There are many reasons.

The matrix may also contain scaling, shearing, or mirroring operations that affect the "orientation" of the object. Indeed, there is no clear definition of this. Any non-orthogonal matrix is not a well-defined rotation matrix. Although the mirror matrix is orthogonal, it is not a valid rotation matrix.

"Bad" data may be obtained from an external data source. For example, when you use physical data to obtain a device, such as an action catcher, errors can occur during the capture process. Many modeling packages are declared messy because they produce a pathological matrix.

It is possible that the rounding error of a floating-point number produces a "data exchange", for example, a large addition to an azimuth action, which is common in games that allow people to control the orientation of objects manually. Due to the limitation of floating-point precision, a large number of matrix multiplication may eventually lead to pathological matrices. This phenomenon is called "matrix Creep". Matrix orthogonality can solve the problem of matrix creep.

Summary:

A matrix is a "brute force" method of expressing azimuth, and we can explicitly list the base vector of another coordinate system in the current coordinate system.

It is useful to express the orientation in matrix form, mainly because it allows the rotation of vectors between different coordinate systems.

The current graphics API uses a matrix to describe the orientation.

You can use matrix multiplication to connect nested matrices to get a single matrix.

The inverse of matrices provides a mechanism for obtaining "opposite" angular displacements.

The matrix consumes a lot of memory. Wasting resources such as animation data when there is a large number of orientations that need to be stored is a big problem.

Not all matrices can describe orientation. Some matrices also include situations such as mirroring or shearing. Getting bad data or matrix creep from an external data source can lead to a pathological matrix.

The number in the matrix is not intuitive for humans.




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.