You are on page 1of 7

Quaternions

1
Quaternion Definition
Quaternion:
q = (q0 , q1 , q2 , q3 )
This can be interpreted as a constant + vector:

q = (q0 , q)

2
Operations with Quaternions
Quaternion addition/subtraction:

p ± q = (p0 ± q0 , p ± q)

Quaternion multiplication:

pq = (p0 q0 pT q, p0 q + q0 p + p ⇥ q)

Quaternion inverse:
1
q = (q0 , q)
4
Axis-Angle Representation to Quaternion
Quaternions can be used to represent rigid-body rotations.

Recall the axis-angle representation of rotations:


Angle of rotation:
Axis of rotation: u

The equivalent quaternion is:


q = (cos( ), u1 sin( ), u2 sin( ), u3 sin( ))
2 2 2 2
5
Quaternions to Axis-Angle Representation
Given a quaternion:
q = (q0 , q1 , q2 , q3 )

The equivalent axis-angle representation is:


Angle of rotation: 2 cos 1 (q0 )
2 q 3
p 2 1
1 q
6 p q2 0 7
Axis of rotation: u2 = 6
4
7
05
1 q 2

p q3 2
1 q0
6
Vector Rotation with Quaternions
To rotate a vector p in R3 by the quaternion q:
1. Define quaternion:
p = (0, p)
2. The result after rotation is:
p0 = qpq 1
= (0, p0 )

We can easily compose two rotations:


q = q2 q1
7
Properties of Quaternions
• q = (q0 , q1 , q2 , q3 ) and q = ( q0 , q1 , q2 , q3 )
represent the same rotation.

• Compact representation of rotations, with only 4


parameters.
• No singularities
• Quaternion product is more numerically stable than
matrix multiplication.
8

You might also like