TUTORIAL on QUATERNIONS Part I - Computer Action...
Transcript of TUTORIAL on QUATERNIONS Part I - Computer Action...
TUTORIAL on QUATERNIONSPart I
Luis Ib anez
August 13,2001
ThisdocumentwascreatedusingLYX andthe LATEX Seminarstyle.
1
Intr oduction
Quaternionsarecommonlyusedto representrotations.
They wereintroducedby William Hamilton(1805-1865)[1]
QuaternionswereconceivedasGeometricalOperators
A CompleteCalculusof Quaternionswasintroducedby Hamilton[2]
2
Definition of Vector
N
M
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
A Vector is a line segmentwith orientation
VectorMN representstherelative position
of point N with respectto point M
3
Hamilton’ s Moti vation for Quaternions
Createa MathematicalConceptto represent
TheRELATIONSHIP betweentwo VECTORS.
In thesameway thata Vectorrepresent
TheRELATIONSHIP betweentwo POINTS.
4
Vector applied to Point
Given:
PointM andaVectorV
Theapplicationof theVectorover
thePointResultsin a
UniquePointNM
N
V
V
M
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
5
Quaternion applied to Vector
In thesameway, Hamiltonwanted
thatgiven
VectorV andaQuaternionQ
Theapplicationof theQuaternion
over theVectorResultsin a
UniqueVectorW
V Q
QV W
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
6
QuatenionRationale
A vectoris completlydefinedby
Length
Orientation
In orderto defineavectorin termsof anothervector
aQuaternionhasto represent
Relative Length
Relative Orientaton
7
Definition of Scalar
A Scalar is definedas
Theratiobetweenthelengthsof two PARALLEL vectorsA and B
A
B
S = Scale
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
It representstheRELATIVE LENGTH of onevector
with respectto theother.
Notethatin programmingjargon scalar hasmistakenly takentheplaceof real
8
Scalar - Vector Operations
SA
B
A Scalar S is theQuotientbetweentwo PARALLEL vectorsA and B
A S B
A Scalar is anOperatorthat
ChangestheSCALE of thevector
Keepsits orientationunchanged
ApplicationtheScalarOperatoris notedby thesymbol .
9
Definition of a Versor
A Versor is definedas
Thequotientbetweentwo non-parallelvectorsof EQUAL LENGTH
B
A
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
It representstheRELATIVE ORIENTATION of onevector
with respectto theother.
10
Versor - Vector Operations
VA
B
A Versor V is theGeometricQuotientbetweentwo non-parallelvectors
of EQUAL LENGTH A and B
A V B
A Versor is anoperatorthat
ChangestheORIENTATION of thevector
Keepsits lengthunchanged
Applicationof theVersorOperatoris notedby thesymbol .
11
Right Versors
A Right Versor is aVersorthatappliesa90 rotation
B
A
V
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Vectorlengthis left unchangedasin any otherVersorapplication
12
ComposingVersors
B
C
A
V2
V1
V3
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
V3 V2 V1
A V2 B
B V1 C
A V2 V1 C
A V3 C
Versorcompositionis the
consecutive applicationof
two versorsoperators.
It is notedby thesymbol
13
ComposingRight Versors
B
A−B
V
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
A V B
B V A
B V V B
1 V V
1 is theINVERSION operatorthatinvertsthedirectionof avector.
Thedoubleapplicationof a right versorto avector, inversesthevector.
14
Definition of Quaternion
QA
B
A Quaternion is theGeometricalQuotientof two vectorsA and B
A Q B
A Quaternion is anoperatorthat
ChangestheORIENTATION of thevector
ChangestheLENGTH of thevector
Applicationof theQuaternionOperatoris notedby thesymbol
15
Quaternion Characteristics
Axis(Q) = Unit Vectorperpendicularto theplaneof rotation
Angle(Q) = Anglebetweenthevectorsin thequotient
Index(Q) = In a Right Quaternionis theAxis(Q) multipliedby the
lengthratio of thetwo vectorsin thequotient.
16
Representationof Quaternions
Quaternion= “A set of Four”
From
theLatin Quaternio
theGreekτετρακτυς
Thecombinedoperationof Scalar andVersor requires4 numbers:
1 for Scale
1 for Angle
2 for Orientation(commonplane)
Quaternion= Scalarcombinedwith Versor
17
OppositeQuaternions
ThequaternionQ
QA
B
hasanOpposite quaternionO Q
O QA
BQ
−A
B
AQ
O(Q)
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
18
OppositeQuaternion Properties
Angle Q Angle O Q π
Axis Q Axis O Q
−A
B
AQ
O(Q)
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
19
Reciprocal Quaternions
B
AR(Q)
Q
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
QA
BThequaternionQ hasa Reciprocal
quaternionR Q
R Q Q 1 B
A
Their composition(onequaternion
appliedaftertheother)is
Q R Q 1
The 1 operatoris anIdentityOperatorthatleavesvectorsunchanged.
20
ConjugateQuaternion
AB
Q
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Giventhepair of vectorsA and B
andtheirquotient
QA
B
Thegeometricreflectionof vector
B (thedenominator)over vector
A (thenumerator)will bevector
C
A
C B
Q
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
21
ConjugateQuaternion
TheConjugate of QuaternionQ is
definedasthequotientK Q
K QA
C
A
C B
QK(Q)
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Angle Q Angle K Q
Axis Q Axis K Q
22
Norm of a Quaternion
TheNorm is thecompositionof aQuaternionwith its Conjugate
N Q Q K Q
QA
B
K QC
A
N QA
B
C
A
C
B
A
B
2
C
BAQ
K(Q)
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
23
Norm of a Quaternion
Therotationof theConjugateK Q
compensatestherotationof the
quaternionQ.
TheoperatorN Q producea
parallelvector, henceN Q is
alwaysapositive Scalar operator
C
BAQ
K(Q)
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
24
Squareof a Quaternion
TheSquare of aQuaternionis definedas:
Applying thequaterniontwice
C
B
A
Q2
Q
Q
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
B Q C
A Q B
A Q Q C
Q Q C
Q Q C
Q 2 C
25
ComposingRight Quaternions
A
B−B
D
EC
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Thesuccesive applicationof aRight Quaternionover aVectorresultsin aVectorin theoppositedirection.
A
B
2B
B1 C
E
D
E
2 D
E
2
Thesquareof any right quaternionis aNEGATIVE scalaroperator
26
Versor of a Quaternion
Versor of a Vector= Unit vectorparallelto thevector
U AA
AA
Versor of a Quaternion= Quotientof theVersorsof thevectors
U Q UA
B
U A
U B
A
B
It is thepartof theQuaternionthatrepresentsRelative Orientation
27
Tensorof a Quaternion
Tensor of aVector= Lengthof thevector
T A A
Tensor of aQuaternion= Quotientof thetensorof thevectors
T Q TA
B
T A
T B
A
B
It is thepartof theQuaternionthatrepresentsRelative Sscale
28
Tensorand Versor of a Quaternion
Versor operatorappliesVERSION to avector
Changesvector’s orientation
TensoroperatorappliesTENSION to avector
Stretchesthevectorandchangeits length
29
Tensorand Versor of a Quaternion
A Vector canbedecomposedin Versor andTensorparts
A T A U A A A
A Quaternion canbedecomposedin Versor andTensorparts
T Q T Q U QT A
T B
U A
U B
30
Vector - Ar cs
Versors canberepresentedon the
surfaceof aunit sphere.
VA
B
Applicationof versorV will
move point B to point A
V
B
A
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
TheMaximumArc joining pointsB andA is definedasVector-Arc
31
Sliding Vector - Ar cs
In thesameway thatVectorscanbetranslatedona plane
V V
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Vector arcs canfreely slidealongthegreatcircle
andstill representtheSAME Versor.
32
Compositionof Biplanar Versors
VBAA
B
composedwith
VCBB
C
resultsin theversor
VCAA
B
B
C
A
C
VBA
VCB
VCA
C
A
B
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
33
Multiplication and Division of Diplanar Versor
TheSpherical Triangle ABC is usedto defineversoroperations
analogouslyto how theparallelogramis usedfor vectoroperations
Multiplication of Versors as
VCA VBA VCB
like thesumof vectors
Division of Versors as
VBAVCAVCB
like thedifferenceof vectors
VBA
VCB
VCA
C
A
B
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
34
Versor Composition is Non-Commutative
A B
C C
A
A’C’
A’
C’
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
TheresultingversorsVCA andVA�
C� have thesameangle
but differentaxis(andso,differentplanes)
35
Compositionof two Orthogonal Right Versors
Themultiplicationof two
orthogonalRight Versorsproducea
Right Versororthogonalto them
VCB VBA VCA
An whentheorderis reversed
VBA VCB VCA
C
A
B
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
36
Square of Elementary Versors
TheSquare of anoperatoris theoperatorappliedtwice
i = i2
i i = −12
i
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Thesquareof Right Versorsis alwaysthe 1 Operator
37
Elementary Versors
i
j
k
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Compositionof ElementaryVersors
right-hand self
i j k i i 1
j k i j j 1
k i j k k 1
38
Index of Right Quaternions
TheIndex of a Right Quaternionis
S<1 S=1 S>1
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
theAxis of thequaternionScaledby theratioof lengths
39
Sum of Versors
VersorsareQuotients.
They canbesummedONLY whenthey have
aCOMMON DENOMIN ATOR
VBCCB
VBAAB
VBC VBAC
B
A
B
C A
B
A CommonDenominatorcanALWAYS befound
40
Getting a Common Denominator
B
D
C
A
VDC
VBA
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
VBAA
BVDC
C
D
41
Getting a Common Denominator
Slidebothversorsalongtheir greatcircles
B’
C’A’
B
D
C
A
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Until theiroriginscoincide
ThevectorB in theintersectionis thecommondenominator
42
Geometrical Inter pretation of the Sum
As with Vectors,first SLIDE both
Vector-Arcs to a commonorigin
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
In orderto getacommondenominator
43
Geometrical Inter pretation of the Sum
Add thetwo vectorsin thenumerator
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Finally getthenew Quotient
44
Sum of two Right Versors
It is alwaysa right quaternion
H/2H/2H
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Its planeBISECTS thoseof theoriginal two versors
andhasaScalar characteristic 1
45
Sum of two Right Versors
TheIndex of theresultingVersor
H/2H/2
H/2
H/2
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
is equalto thesumof indicesof thetwo versors
46
Multiplying a Right Versor by a Scalar
Multiplication by a Scalaraffects
only theScalarpartof theRightVersor
S<1 S=1 S>1
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
It modifiesthelengthrationof thevectorsin theQuotient
47
Right Versor in terms of Orthogonal Right Versor
If thethreeOrthogonalRight Versorsi j k aremultipliedby Scalarsx y z
Q x i y j z k x2 y2 z2 1
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Their sumwill beaRight Versorwhoseaxishas x y z ascomponets.
48
Scalar and Right Parts of Quaternions
A Quaternionoperatorappliedto a vector B
performsanoperationthatproducesanothervector A
QA
B
A Q B
A
B
Q
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
49
Scalar and Right Parts of Quaternions
A
B BS
BR
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
Thenew vector A canbe
expressedasasumof two
orthogonalvectors
A B S B R
Oneparallelto B and
anotherorthogonalto B
50
Scalar and Right Parts of Quaternions
BSB
A
B
A
BR
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
B S is obtainedby applying
anScalarOperatorto B
B R is obtainedby applying
aRight Quaternionto B
51
Tensorand Versor Part of a Quaternion
Thesameoperationcanbedecomposedin
a TensorOperatorandaVersorOperator
A
BTB
T
A
BTB
V
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θq r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
B T T B A V B T
52
Scalarand Right versusTensorand Versor
SCALAR andRIGHT partsarea
Representationin RECTANGULAR coordinates
TENSOR andVERSOR partsarea
Representationin POLAR coordinates
53
QuaternionsasFour Coefficients
Let L betheRatio of lenghtsbetweenvectorsA and B is LA
B
TheScalar factor
SB S
B
shouldbeequalto
Lcosθ
A
B BS
BR
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θ
q r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
54
QuaternionsasFour Coefficients
Let L betheRatio of lenghtsbetweenvectorsA and B is LA
B
TheTensorof heRight part
RB R
B
shouldbeequalto
Lsinθ
A
B BS
BR
PSfragreplacements
xy
h
wq
sq2
dhdq
dw
dxdy
dq 1
q dq
q dq 1
dq q dq 1
q dq q dq 1
z f x y
f x y
θ
q r s
q ∆q r ∆r s ∆s
∆q ∆r ∆s
lim ∆q 0 ∆r 0 ∆s 0
dq dr ds
55
QuaternionsasFour Coefficients
TheQuaternion Q canthenbewrittenas
Q x i y j zk w
Where
w L cosθ
x2 y2 z2 L sinθ
Therealnumberw representstheScalar part,
Thesum x i y j zk representstheRight part.
56
Product of Quaternions
Two quaternionsQ1 andQ2 arecomposedby
Q1 Q2 T Q1 U Q1 T Q2 U Q2
Thatis equivalentto
Q1 Q2 T Q1 T Q2 U Q1 U Q2
57
Product of Quaternions
GivenaQuaternionQ resultingfrom thecomposition
Q Q1 Q2
Its Tensoris
T Q T Q1 T Q2
Its Versoris
U Q U Q1 U Q2
58
Representationby four coefficients
Let P andQ betwo Quaternions, representedby four coefficients
P xp i yp j zp k wp
Q xq i yq j zq k wq
Their compositionP Q canbeexpressedby
P Q L P Q
wp zp yp xp
zp wp xp yp
yp xp wp zp
xp yp zp wp
xq
yq
zq
wq
59
Representationby four coefficients
Let P andQ betwo Quaternions, representedby four coefficients
P xp i yp j zp k wp
Q xq i yq j zq k wq
Their compositionP Q canbeexpressedby
P Q R Q P
wq zq yq xq
zq wq xq yq
yq xq wq zq
xq yq zq wq
xp
yp
zp
wp
60
Rotating a Vector (Finally !! )
A Quaternionq x y z w rotatesa Vectorv by usingtheproduct
v q v q 1
Whichcanbereducedto aMatrix-VectormultiplicationL q R q 1 v
w2 x2 y2 z2 2xy 2wz 2xz 2wy 0
2xy 2wz w2 x2 y2 z2 2yz 2wx 0
2xz 2wy 2yz 2wx w2 x2 y2 z2 0
0 0 0 w2 x2 y2 z2
61
References
[1] W.R. Hamilton. Elements of Quaternions, volumeI. Chelsea
PublishingCompany, third edition,1969.Theoriginalwaspublished
in 1866.
[2] C.J.Joly. A Manual of Quaternions. MacMillan andCo.,Limited,
1905.
62