Quaternion and normalization

前端 未结 6 1421
遇见更好的自我
遇见更好的自我 2020-12-23 12:34

I know that quaternions need to be normalized if I want to rotate a vector.

But are there any reasons to not automatically normalize a quaternion? And if there are,

6条回答
  •  滥情空心
    2020-12-23 12:58

    Use of NONunit quaternions can be efficient.

    Only few operations require unit length, for example interpolation.

    Some tips:

    1. Creating and conversions to nonunit quaternions can be more efficient.
    2. Conversion to matrix from nonunit quaternion is still fast. Just compensate scale of quaternion squared.
    3. conversion matrix to nonunit quat is faster.

    So it is not required to use only unit quaternions, it is just common practice. For every use case you can make decision use or not normalization. Personally i prefer to use nonunit quaternions.

    WARNING: often, working with unit quaternions, we forget about numerical errors. For example, converting from/to matrix quaternion and thinking that it still unit make big numerical unstability, matrix is scaled , quaternions extracted is invalid. You can easy make such experiment.

提交回复
热议问题