Can i switch X Y Z in a quaternion?

前端 未结 4 1712
忘掉有多难
忘掉有多难 2021-02-08 14:28

i have a coordinate system where the Y axis is UP. I need to convert it to a coordinate system where Z is UP. I have the rotations stored in quaternions, so my question is : if

4条回答
  •  清歌不尽
    2021-02-08 14:33

    Just swpping two axes in a quaternions? No this doesn't work because this flips the chirality. However if you flip the chirality and negate the quaternion's real part then you're back in the original chirality. In general form you can write this as

    Q'(Q, i'j'k') = εi'j'k' Qw_w + Qi_i + Qj_j + Qk_k

    where

    Levi-Cevita Symbol Definition

    is the totally antisymmetric tensor, known as the Levi-Cevita symbol.

    This shouldn't be a surprise, as the i², j², k² rules of quaternions are defined also by the same totally antisymmetric tensor.

提交回复
热议问题