Dual quaternion: Difference between revisions

From David's Wiki
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
{{ main | Wikipedia: Dual quaternion}}
{{ main | Wikipedia: Dual quaternion}}


A dual quaternion can be written as <math>\mathbf{q} = \mathbf{q}_r + \mathbf{q}_d \epsilon</math>.   
A dual quaternion can be written as <math>\mathbf{q} = \mathbf{q}_r + \mathbf{q}_d \varepsilon</math>.   
Here, <math>\epsilon^2=0</math>.
Here, <math>\varepsilon^2=0</math>.


Multiplication is: 
;Scalar Multiplication
<math>\mathbf{q}_1 \mathbf{q}_2 = \mathbf{q}_{r1} \mathbf{q}_{r2} + (\mathbf{q}_{r1}\mathbf{q}_{d2} + \mathbf{q}_{d1} \mathbf{q}_{r2})\epsilon</math>.
<math>s\mathbf{q} = s\mathbf{q}_r + s \mathbf{q}_d \varepsilon</math>


===Rotations and Translations===
;Addition
<math>\mathbf{q}_1 + \mathbf{q}_2 = \mathbf{q}_{r1} +\mathbf{q}_{r2}  +  (\mathbf{q}_{d1} + \mathbf{q}_{d2}) \varepsilon</math>
 
;Multiplication
<math>\mathbf{q}_1 \mathbf{q}_2 = \mathbf{q}_{r1} \mathbf{q}_{r2} + (\mathbf{q}_{r1}\mathbf{q}_{d2} + \mathbf{q}_{d1} \mathbf{q}_{r2})\varepsilon</math>.
 
;Conjugate
<math>\mathbf{q}^* = \mathbf{q}_{r}^* + \mathbf{q}_{d}^*\varepsilon</math>
 
;Magnitude
<math>\Vert \mathbf{q} \Vert = \mathbf{q}\mathbf{q}^*</math>
 
==Rotations and Translations==
A translation is represented as:   
A translation is represented as:   
<math>\mathbf{q}_t = [1,0,0,0][0, \frac{t_x}{2}, \frac{t_y}{2}, \frac{t_z}{2}] = 1 + \frac{\epsilon}{2}\mathbf{t}</math>
<math>\mathbf{q}_t = [1,0,0,0][0, \frac{t_x}{2}, \frac{t_y}{2}, \frac{t_z}{2}] = 1 + \frac{\varepsilon}{2}\mathbf{t}</math>


A rotation is represented as:   
A rotation is represented as:   
<math>\mathbf{q}_r = [\cos(\frac{\theta}{2}), \sin(\frac{\theta}{2})n_x, \sin(\frac{\theta}{2})n_y, \sin(\frac{\theta}{2})n_z][0,0,0,0] = \cos(\frac{\theta}{2}) + \sin(\frac{\theta}{2}) \mathbf{n}</math>
<math>\mathbf{q}_r = [\cos(\frac{\theta}{2}), \sin(\frac{\theta}{2})n_x, \sin(\frac{\theta}{2})n_y, \sin(\frac{\theta}{2})n_z][0,0,0,0] = \cos(\frac{\theta}{2}) + \sin(\frac{\theta}{2}) \mathbf{n}</math>


These can be combined as <math>\mathbf{q} = \mathbf{q}_t * \mathbf{q}_r = \mathbf{q}_r + \frac{\epsilon}{2}\mathbf{t}\mathbf{q}_r</math>.   
These can be combined as <math>\mathbf{q} = \mathbf{q}_t * \mathbf{q}_r = \mathbf{q}_r + \frac{\varepsilon}{2}\mathbf{t}\mathbf{q}_r</math>.   
Applying the transformation to a point <math>\mathbf{v} \in \mathbb{R}^3</math> is:
Applying the transformation to a point <math>\mathbf{v} \in \mathbb{R}^3</math> is:


<math>\mathbf{p}' = \mathbf{q}(1 + \epsilon\mathbf{v})\mathbf{q}^*</math>
<math>\mathbf{p}' = \mathbf{q}(1 + \varepsilon\mathbf{v})\mathbf{q}^*</math>


==Resources==
==Resources==
* [https://cs.gmu.edu/~jmlien/teaching/cs451/uploads/Main/dual-quaternion.pdf A Beginners Guide to Dual-Quaternions by Ben Kenwright]
* [https://cs.gmu.edu/~jmlien/teaching/cs451/uploads/Main/dual-quaternion.pdf A Beginners Guide to Dual-Quaternions by Ben Kenwright]

Latest revision as of 13:39, 16 October 2020

Dual quaternions are an 8-dimensional number system (i.e. isomorphic to \(\displaystyle \mathbb{R}^8\)) which can be used to jointly represent rotations and translations in 3D space. They can be used in place of the standard \(\displaystyle 4 \times 4\) homogeneous transformation matrices.

Background

A dual quaternion can be written as \(\displaystyle \mathbf{q} = \mathbf{q}_r + \mathbf{q}_d \varepsilon\).
Here, \(\displaystyle \varepsilon^2=0\).

Scalar Multiplication

\(\displaystyle s\mathbf{q} = s\mathbf{q}_r + s \mathbf{q}_d \varepsilon\)

Addition

\(\displaystyle \mathbf{q}_1 + \mathbf{q}_2 = \mathbf{q}_{r1} +\mathbf{q}_{r2} + (\mathbf{q}_{d1} + \mathbf{q}_{d2}) \varepsilon\)

Multiplication

\(\displaystyle \mathbf{q}_1 \mathbf{q}_2 = \mathbf{q}_{r1} \mathbf{q}_{r2} + (\mathbf{q}_{r1}\mathbf{q}_{d2} + \mathbf{q}_{d1} \mathbf{q}_{r2})\varepsilon\).

Conjugate

\(\displaystyle \mathbf{q}^* = \mathbf{q}_{r}^* + \mathbf{q}_{d}^*\varepsilon\)

Magnitude

\(\displaystyle \Vert \mathbf{q} \Vert = \mathbf{q}\mathbf{q}^*\)

Rotations and Translations

A translation is represented as:
\(\displaystyle \mathbf{q}_t = [1,0,0,0][0, \frac{t_x}{2}, \frac{t_y}{2}, \frac{t_z}{2}] = 1 + \frac{\varepsilon}{2}\mathbf{t}\)

A rotation is represented as:
\(\displaystyle \mathbf{q}_r = [\cos(\frac{\theta}{2}), \sin(\frac{\theta}{2})n_x, \sin(\frac{\theta}{2})n_y, \sin(\frac{\theta}{2})n_z][0,0,0,0] = \cos(\frac{\theta}{2}) + \sin(\frac{\theta}{2}) \mathbf{n}\)

These can be combined as \(\displaystyle \mathbf{q} = \mathbf{q}_t * \mathbf{q}_r = \mathbf{q}_r + \frac{\varepsilon}{2}\mathbf{t}\mathbf{q}_r\).
Applying the transformation to a point \(\displaystyle \mathbf{v} \in \mathbb{R}^3\) is:

\(\displaystyle \mathbf{p}' = \mathbf{q}(1 + \varepsilon\mathbf{v})\mathbf{q}^*\)

Resources