19 lines
700 B
Markdown
19 lines
700 B
Markdown
# Quaternions
|
|
|
|
|
|
|
|
|
|
These are four dimensional numbers useful for rotation. Unlike matrices quaternions do not cause problems when rotating i.e. when the determinant is very small. Like complex number rotation, they simply wrap around.
|
|
|
|
$R,i,j,k$$ where $i,j,k$ are complex so $i*i=-1, j*j=-1, k*k=-1$. However these complex planes are orthogonal. They correspond to axes in cartesian coordinates, i.e. $i$ is the x axis, $j$ is the y axis and $k$ the z.
|
|
|
|
Also $i*j*k = -1$.
|
|
|
|
Multiplying by $i$ say rotates any vector or coordinate around $90^\circ$
|
|
|
|
The following python program allows you to play with quaternions, seeing the intermediate un-pure quaternion results as well.
|
|
|
|
![[quat_gui 1.py]]
|
|
|
|
---
|