# Maths - Quaternion to Euler - Sample Orientations

## Sample Rotations

In order to try to explain things and give some examples we can try I thought it might help to show the rotations for a finite subset of the rotation group. We will use the set of rotations of a cube onto itself, this is a permutation group which gives 24 possible rotations as explaned on this page.

In the following table we will need to know what quadrant the results are in, so I have taken some sample results from Math.atan2 (using java Math library).

```atan2(0.0,0.0)=0.0 (although Math.atan2 returns 0 this is abitary and if both x and y is zero we need to find some other way to get to value
atan2(0.0,1.0)=0.0
atan2(1.0,1.0)=0.7853981633974483
atan2(1.0,0.0)=1.5707963267948966
atan2(1.0,-1.0)=2.356194490192345
atan2(0.0,-1.0)=3.141592653589793
atan2(-1.0,-1.0)=-2.356194490192345
atan2(-1.0,0.0)=-1.5707963267948966
atan2(-1.0,1.0)=-0.7853981633974483```

heading applied first giving 4 possible orientations:

Then apply attitude +90 degrees for each of the above: (note: that if we went on to apply bank to these it would just rotate between these values, the straight up and streight down orientations are known as singularities because they can be fully defined without using the bank value) post multiply above by 0.7071 + k 0.7071 to give:

Or instead apply attitude -90 degrees (also a singularity): post multiply top row by 0.7071 - k 0.7071 to give:

Normally we dont go beond attitude + or - 90 degrees because thes are singularities, instead apply bank +90 degrees: post multiply top row by 0.7071 + i 0.7071 to give:

Apply bank +180 degrees: post multiply top row by i to give: