When do I need to use quaternions?

后端 未结 6 1102
逝去的感伤
逝去的感伤 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:34

    Pros of quaternions

    1. Fast multiplication
    2. Fast to/from matrix conversion
    3. Avoid additional (from computation) noise (scale , shear) , and represent pure rotation
    4. Simple rotation interpolation, in custom case for real time animation can be used linear interpolation.
    5. Some tricky operations available, fast rotation integration, twist swing decompositions

    Cons.

    1. Transformation of vector is not so fast as with 3x3 matrix.
    2. Contains 4 scalar, but compact rotation representation can use only 3.

提交回复
热议问题