When do I need to use quaternions?

后端 未结 6 1099
逝去的感伤
逝去的感伤 2021-02-01 05:29

I have been carrying out 2D and 3D operations, including graphics, for many years and have never used quaternions so I don\'t have a feel for them. I know that they can be used

6条回答
  •  醉话见心
    2021-02-01 06:16

    Quaternions have many advantages over Euler angles and are often preferable for 3D rotations:

    • Easier (and well-defined) interpolation between quaternions (or: orientations): the resulting movement has constant angular velocity around a single axis, which is often aesthetically more pleasing. This process is called "slerp" and critical for animation/rotation blending. Furthermore, quaternion interpolation does not suffer from Gimbal locks.
    • They are easy to renormalize.

    Disadvantages:

    • The main disadvantage is that they require a bit more math and are less intuitive than Euler/Cardanic angles.
    • Compared to affine transformation matrices, Quaternions only contain a rotation, and no translation and scaling.

提交回复
热议问题