What's a quaternion rotation?

前端 未结 2 1624
无人共我
无人共我 2021-01-07 17:54

Is quaternion rotation just a vector with X,Y,Z which the object will rotate towards, and a roll which turns the object on its axis?

Is it that simple?

Meani

2条回答
  •  误落风尘
    2021-01-07 18:43

    A quaternion has 4 components, which can be related to an angle θ and an axis vector n. The rotation will make the object rotate about the axis n by an angle θ.

    For example, if we have an cube like

     ______
    |\  6  \
    | \_____\     z
    |5 |    | : y ^
     \ | 4  |    \|
      \|____|     +--> x
    

    Then a rotation of 90° about the axis (x=0, y=0, z=1) will rotate the "5" face from the left to the front.

     ______
    |\  6  \
    | \_____\      z
    |3 |    | :  x ^
     \ | 5  |     \|
      \|____|  y<--+
    

    (Note: This is the axis/angle description of rotation, which is what OP confuses. For how quaternion is applied to rotation, see http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation)

提交回复
热议问题