11

四元数的两个公式

 3 years ago
source link: https://zhuanlan.zhihu.com/p/343095440
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

给出四元数两个常见公式的比较直接的推导。

本文会较多的用到四元数的乘法公式

MBfAbqf.png!mobile

  1. 球面插值公式

zaaUZbu.png!mobilenumeQjq.png!mobile 的球面插值公式为

UVjQVfq.png!mobile

其中

6NfmMze.png!mobile

比较常见的办法是利用三维向量的球面插值类比得到,其实可以直接算出来。

iuUZ3iv.png!mobile 状态转到 f6nq22B.png!mobile 状态的转角为 ,转轴为 ,那么有

AnQ7BfM.png!mobile

按照定义插值公式应该为

7nYBFfF.png!mobile

按照四元数性质有

i6fYZrf.png!mobile

可得

UBf2yy.png!mobile

注意 yMfmii.png!mobile ,利用四元数乘法可得

MZzAfuq.png!mobile

所以 Uve2aqz.png!mobile ,带回得到

2.四元数的导数和角速度的关系

Vv2Qn27.png!mobile

我在 《基于物理的建模与动画》的翻译 中给出了另一种

考虑刚体的定点转动,那么刚体上一点的位置随时间变化为

yie2IzN.png!mobile

已知

EjuEfmE.png!mobile

两边求导可得

uimENrB.png!mobile

利用这个关系代入对 auUZVzR.png!mobile 的求导,化简可得

2AJv2in.png!mobile

注意 QVra2aR.png!mobile 这个四元数正好与 RZzuE3B.png!mobile 互为共轭,两个互为共轭的四元数之和为零,只有一种可能就是这个四元数的实部为零,可以表示为一个三维向量,这里记为 Ezmam2J.png!mobile ,利用四元数的乘法公式可知

bInUjuM.png!mobile

而已知

nU3Qzyf.png!mobile

考虑到任意性只有 6nYFJzA.png!mobile ,进而

QVzU7nE.png!mobile


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK