我可以在四元数中切换X Y Z吗? [英] Can i switch X Y Z in a quaternion?

查看:202
本文介绍了我可以在四元数中切换X Y Z吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Y轴为UP的坐标系.我需要将其转换为Z为UP的坐标系.我将旋转数存储在四元数中,所以我的问题是:如果我有四元数X,Y,Z,我可以用Z切换Y并得到Z实际为UP的结果吗?

解决方案

只需在四元数中交换两个轴?不,这不起作用,因为这会颠倒手性.但是,如果您翻转手性并否定四元数的实部,那么您将恢复原始手性.通常,您可以将其写为

Q'(Q,i'j'k')=ε i'j'k' Q w _w + Q i _i + Q j _j + Q k _k

其中

是完全反对称的张量,称为Levi-Cevita符号.

这并不奇怪,因为四元数的i²,j²,k²规则也由相同的完全反对称张量定义.

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 i have a quaternion X,Y,Z can i switch the Y with the Z and get the result that Z is actually UP?

解决方案

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

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.

这篇关于我可以在四元数中切换X Y Z吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆