没有合适的资源?快使用搜索试试~ 我知道了~
四元数的基础知识与初步总结
需积分: 0 0 下载量 115 浏览量
2023-09-11
15:58:51
上传
评论
收藏 94KB PDF 举报
温馨提示
试读
12页
四元数的基础知识与初步总结
资源推荐
资源详情
资源评论
1
Quaternions
Ken Shoemake
Department of Computer and Information Science
University of Pennsylvania
Philadelphia, PA 19104
Abstract
Of the many mathematical tools used in computer graphics, most are well covered
in standard texts; quaternions are not. This article is intended to provide tutorial
material on quaternions, including what they are, why they are useful, how to use
them, where to use them, and when to be careful.
Introduction
Computer graphics uses quaternions as coordinates for rotations and orientations.
At SIGGRAPH 1985, quaternion curve methods were introduced to computer
graphics to facilitate rotation animation. Although this is a rather specialized
environmental niche, quaternions work so well they are able to compete
successfully both with more general coordinates such as matrices, and with other
special coordinates such as Euler angles.
Quaternion use has since expanded to include new curve methods and new
applications, including physically based modeling, constraint systems, and user
interfaces. This is because when a quaternion implementation is compared to other
alternatives, it is usually simpler, cheaper, and better behaved.
That’s the good news. The bad news is that researchers and implementors must
learn some new mathematics, and quaternions are not taught in core mathematics
and science courses. However, neither are homogeneous coordinates; and a broad
view reveals that quaternions are simply a more sophisticated use of the four-
component homogeneous coordinates to which we are already accustomed.
Rotations
What can be so unusual about three-dimensional rotations that they warrant their
own coordinate system? Put simply, because rotations do not commute, they cannot
be treated as vectors. Suppose T
x
(d) is translation along the x axis by d, and R
x
(θ) is
rotation around the x axis by θ ; similarly for T
y
, T
z
, R
y
, and R
z
. Then
T
y
(45cm)
°
T
x
(90cm) commutes, meaning it equals T
x
(90cm)
°
T
y
(45cm); but
2
R
y
(45°)
°
R
x
(90°) ≠ R
x
(90°)
°
R
y
(45°). (As usual, B
°
A means the composition of action A
followed by action B.) Note also that if we take the composition R
y
(180°)
°
R
x
(180°) we
get the same result as R
z
(180°)!
It takes some study to unravel all the implications of these elementary observations,
but they are far-reaching and often surprising. The set of all 3-dimensional rotations
is not organized as a simple 3-dimensional vector space, but as a closed curved 3-
dimensional manifold, which is also a (continuous) group. This group is known as
SO(3). (For special and orthogonal.) Manifolds are generalizations of surfaces; this
one has the topology of real 3-dimensional projective space, RP
3
, and also a natural
distance measure related to rotation angle. Although a vector space such as the
translations trivially splits into a product of lines, SO(3) does not split. Instead, it has
a more sophisticated description as a fiber bundle over the sphere of directions, S
2
,
with fiber space the planar rotations, SO(2).
Unit quaternions have the remarkable property of capturing all of the geometry,
topology, and group structure of 3-dimensional rotations in the simplest possible
way. (Technically, they form what is called a universal covering.)
Quaternion definitions
Quaternions can be defined in several different, equivalent ways. It is helpful to
know them all, since each form is useful. Historically, quaternions were conceived
by Hamilton as like extended complex numbers, w+ix+jy+kz, with i
2
= j
2
= k
2
= –1, ij
= k = –ji, with real w, x, y, z. (In honor of Hamilton, mathematicians denote the
quaternions by H.) Notice the non-commutative multiplication, their novel feature;
otherwise, quaternion arithmetic is pretty much like real arithmetic. Hamilton was
also quite aware of the more abstract possibility of treating quaternions as simply
quadruples of real numbers [x, y, z, w ], with operations of addition and
multiplication suitably defined. But it happens that the components naturally group
into the imaginary part, (x, y, z), for which Hamilton coined the term vector, and the
purely real part, w , which he called a scalar. Later authors (notably Gibbs)
appropriated Hamilton’s terminology and extracted from the clean operations of
quaternion arithmetic the somewhat messier—but more general—operations of
vector arithmetic. Courses today teach Gibbs’ dot and cross products, so it is
convenient to reverse history and describe the quaternion product using them.
Thus we usually will want to write a quaternion as [v, w], with v = (x, y, z). We will
3
identify real numbers s with quaternions [0, s], and vectors v ∈ R
3
with quaternions
[v, 0]. Here are some basic facts.
Forms
q
def
=
[v, w] ; v ∈ R
3
, w ∈ R
= [(x, y, z), w] ; x, y, z, w ∈ R
= [x, y, z, w] ; x, y, z, w ∈ R
= ix+jy+kz+w ; x, y, z, w ∈ R, i
2
= j
2
= k
2
= ijk = –1
Addition
q + q´ = [v, w] + [v´, w´]
def
=
[v + v´, w + w´]
Multiplication
qq´ = [v, w][v´, w´]
def
=
[v×v´+wv´+w´v, ww´–v·v´]
Multiplication facts
(pq)q´ = p(qq´)
1q = q1 = [0, 1][v, w]
= [1v, 1w] = [v, w]
sq = qs = [0, s][v, w]
= [sv, sw]
vv´ = [v, 0][v´, 0]
= [v×v´, –v·v´]
Bilinearity
p(sq+s´q´) = spq + s´pq´
(sq+s´q´)p = sqp + s´q´p
Conjugate
q
*
= [v, w]
*
def
=
[–v, w]
Conjugation facts
(q
*
)
*
= q
(pq)
*
= q
*
p
*
(p+q)
*
= p
*
+q
*
Norm
N(q)
def
=
qq
*
= q
*
q
= w
2
+ v·v
= w
2
+ x
2
+ y
2
+ z
2
Norm facts
N(qq´) = N(q)N(q´)
N(q
*
) = N(q)
Inverse
q
–1
= q
*
/ N(q)
Unit quaternion facts
Let N(q) = N(q´) = N(vˆ ) = 1. Then:
q = [vˆ sin Ω, cos Ω] (for some vˆ )
N(qq´) = 1
q
–1
= q
*
vˆ
2
= –1
e
vˆ Ω
= 1 + vˆ Ω + (vˆ Ω)
2
/2! +
…
= [vˆ sin Ω, cos Ω]
剩余11页未读,继续阅读
资源评论
Selvendy
- 粉丝: 1
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功