没有合适的资源?快使用搜索试试~ 我知道了~
Quaternions, Interpolation and Animation.pdf
需积分: 6 3 下载量 54 浏览量
2022-11-01
13:56:45
上传
评论 1
收藏 846KB PDF 举报
温馨提示
试读
103页
比较全面介绍四元数的一篇文档,非常不错,推荐给大家。
资源推荐
资源详情
资源评论
Quaternions, Interp olation and Animation
Erik B. Dam Martin Ko ch Martin Lillholm
Technical Rep ort DIKU-TR-98/5
Department of Computer Science
University of Cop enhagen
Universitetsparken 1
DK-2100 Kbh
Denmark
July 17, 1998
Abstract
The main topics of this technical rep ort are quaternions, their mathematical prop-
erties, and how they can b e used to rotate ob jects. Weintro duce quaternion math-
ematics and discuss why quaternions are a b etter choice for implementing rotation
than the well-known matrix implementations. We then treat dierent metho ds for
interp olation between series of rotations. During this treatment we give complete
pro ofs for the correctness of the imp ortantinterp olation metho ds
Slerp
and
Squad
.
Inspired by our treatment of the dierentinterpolation metho ds we develop our own
interp olation metho d called
Spring
based on a set of ob jective constraints for an
optimal interpolation curve. This results in a set of dierential equations, whose
analytical solution meets these constraints. Unfortunately, the set of dierential
equations cannot be solved analytically. As an alternative we prop ose a numerical
solution for the dierential equations. The dierentinterp olation metho ds are visu-
alized and commented. Finally we provide a thorough comparison of the two most
convincing metho ds (
Spring
and
Squad
). Thereby, this rep ort provides a comprehen-
sive treatment of quaternions, rotation with quaternions, and interpolation curves
for series of rotations.
i
Contents
1 Intro duction 1
2 Geometric transformations 3
2.1 Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Two rotational modalities 5
3.1 Euler angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Rotation matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3.1 Historical background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3.2 Basic quaternion mathematics . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3.3 The algebraic prop erties of quaternions. . . . . . . . . . . . . . . . . . . . 12
3.3.4 Unit quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.5 The exp onential and logarithm functions . . . . . . . . . . . . . . . . . . 15
3.3.6 Rotation with quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3.7 Geometric intuition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3.8 Quaternions and dierential calculus . . . . . . . . . . . . . . . . . . . . . 23
3.4 An algebraic overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
ii
4 A comparison of quaternions, Euler angles and matrices 27
4.1 Euler angles/matrices | Disadvantages . . . . . . . . . . . . . . . . . . . . . . . 27
4.2 Euler angles/matrices | Advantages . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3 Quaternions | Disadvantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4 Quaternions | Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.6 Other mo dalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5 Visualizing interpolation curves 34
5.1 Direct visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2 Visualizing an approximation of angular velocity . . . . . . . . . . . . . . . . . . 34
5.3 Visualizing the smo othness of interp olation curves . . . . . . . . . . . . . . . . . 35
5.4 Some examples of visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6 Interp olation of rotation 38
6.1 Interp olation b etween two rotations . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.1.1 Linear Euler interpolation:
LinE uler
. . . . . . . . . . . . . . . . . . . . 38
6.1.2 Linear Matrix interp olation:
LinM at
. . . . . . . . . . . . . . . . . . . . 39
6.1.3 Linear Quaternion interpolation:
Ler p
. . . . . . . . . . . . . . . . . . . . 40
6.1.4 A summary of linear interpolation . . . . . . . . . . . . . . . . . . . . . . 41
6.1.5 Spherical Linear Quaternion interp olation:
Slerp
. . . . . . . . . . . . . . 42
6.2 Interp olation over a series of rotations:
Heuristic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2.1 Spherical Spline Quaternion interpolation:
Squad
. . . . . . . . . . . . . . 51
6.3 Interp olation b etween a series of rotations:
Mathematical approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.3.1 The interp olation curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.3.2 Denitions of smo othness . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.3.3 The optimal interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.3.4 Curvature in
H
1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.3.5 Minimizing curvature in
H
1
: Continuous, analytical solution . . . . . . . 60
6.3.6 Minimizing curvature in
H
1
: Continuous, semi-analytical solution . . . . . 63
6.3.7 Minimizing curvature in
H
1
: Discretized, numerical solution . . . . . . . . 64
iii
7
Squad
and
Spring
77
7.1 Example: A semi circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.2 Example: A nice soft curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7.3 Example: Interpolation curve with cusp . . . . . . . . . . . . . . . . . . . . . . . 79
7.4 Example: A pendulum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.5 Example: A perturb ed p endulum . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.6 Example: Global prop erties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
8 The Big Picture 85
8.1 Comparison to previous work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
8.2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A Conventions 89
B Conversions 90
B.1 Euler angles to matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
B.2 Matrix to Euler angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
B.3 Quaternion to matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
B.4 Matrix to Quaternion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
B.5 Between quaternions and Euler angles . . . . . . . . . . . . . . . . . . . . . . . . 93
C Implementation 94
C.1 The basic structure of
quat
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
iv
剩余102页未读,继续阅读
资源评论
wd1879804
- 粉丝: 0
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功