Maths - Euler to Matrix - 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.

heading applied first giving 4 possible orientations:

rightUp

reference orientation

heading = 0
attitude = 0
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=1
ca=1
cb=1
sh=0
sa=0
sb=0

 

1 0 0
0 1 0
0 0 1

backUp

rotate by 90 degrees about y axis

heading = 90 degrees
attitude = 0
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=1
cb=1
sh=1
sa=0
sb=0

 

0 0 1
0 1 0
-1 0 0

leftUp

rotate by 180 degrees about y axis

heading = 180 degrees
attitude = 0
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=-1
ca=1
cb=1
sh=0
sa=0
sb=0

 

-1 0 0
0 1 0
0 0 -1

forwardUp

rotate by 270 degrees about y axis

heading = -90 degrees
attitude = 0
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=1
cb=1
sh=-1
sa=0
sb=0

 

0 0 -1
0 1 0
1 0 0

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)

upLeft

heading = 0
attitude = 90 degrees
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=1
ca=0
cb=1
sh=0
sa=1
sb=0

 

0 -1 0
1 0 0
0 0 1

upForward

heading = 90 degrees
attitude = 90 degrees
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=0
cb=1
sh=1
sa=1
sb=0

 

0 0 1
1 0 0
0 1 0

upRight

heading = 180 degrees
attitude = 90 degrees
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=-1
ca=0
cb=1
sh=0
sa=1
sb=0

0 1 0
1 0 0
0 0 -1

upBack

heading = -90 degrees
attitude = 90 degrees
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=0
cb=1
sh=-1
sa=1
sb=0

 

0 0 -1
1 0 0
0 -1 0

Or instead apply attitude -90 degrees (also a singularity):

downRight

heading = 0
attitude = -90 degrees
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=1
ca=0
cb=1
sh=0
sa=-1
sb=0

 

0 1 0
-1 0 0
0 0 1

downBack

heading = 90 degrees
attitude = -90 degrees
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=0
cb=1
sh=1
sa=-1
sb=0

 

0 0 1
-1 0 0
0 -1 0

downLeft

heading = 180 degrees
attitude = -90 degrees
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=-1
ca=0
cb=1
sh=0
sa=-1
sb=0

 

0 -1 0
-1 0 0
0 0 -1

downForward

heading = -90 degrees
attitude = -90 degrees
bank = 0

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=0
cb=1
sh=-1
sa=-1
sb=0

 

0 0 -1
-1 0 0
0 1 0

Normally we dont go beond attitude + or - 90 degrees because thes are singularities, instead apply bank +90 degrees:

rightForward

heading = 0
attitude = 0
bank = 90 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=1
ca=1
cb=0
sh=0
sa=0
sb=1

 

1 0 0
0 0 -1
0 1 0

backRight

heading = 90 degrees
attitude = 0
bank = 90 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=1
cb=0
sh=1
sa=0
sb=1

 

0 1 0
0 0 -1
-1 0 0

leftBack

heading = 180 degrees
attitude = 0
bank = 90 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=-1
ca=1
cb=0
sh=0
sa=0
sb=1

-1 0 0
0 0 -1
0 -1 0

 

forwardLeft

heading = -90 degrees
attitude = 0
bank = 90 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=1
cb=0
sh=-1
sa=0
sb=1

 

0 -1 0
0 0 -1
1 0 0

Apply bank +180 degrees:

rightDown

heading = 0
attitude = 0
bank = 180 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=1
ca=1
cb=-1
sh=0
sa=0
sb=0

 

1 0 0
0 -1 0
0 0 -1

backDown

heading = 90 degrees
attitude = 0
bank = 180 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=1
cb=-1
sh=1
sa=0
sb=0

 

0 0 -1
0 -1 0
-1 0 0

leftDown

heading = 180 degrees
attitude = 0
bank = 180 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=-1
ca=1
cb=-1
sh=0
sa=0
sb=0

 

-1 0 0
0 -1 0
0 0 1

forwardDown

heading = -90 degrees
attitude = 0
bank = 180 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=1
cb=-1
sh=-1
sa=0
sb=0

 

0 0 1
0 -1 0
1 0 0

Apply bank -90 degrees:

rightBack

heading = 0
attitude = 0
bank = -90 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=1
ca=1
cb=0
sh=0
sa=0
sb=-1

 

1 0 0
0 0 1
0 -1 0

backLeft

heading = 90 degrees
attitude = 0
bank = -90 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=1
cb=0
sh=1
sa=0
sb=-1

 

0 -1 0
0 0 1
-1 0 0

leftForward

heading = 180 degrees
attitude = 0
bank = -90 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=-1
ca=1
cb=0
sh=0
sa=0
sb=-1

-1 0 0
0 0 1
0 1 0

 

forwardRight

heading = -90 degrees
attitude = 0
bank = -90 degrees

ch*ca -ch*sa*cb + sh*sb ch*sa*sb + sh*cb
sa ca*cb -ca*sb
-sh*ca sh*sa*cb + ch*sb - sh*sa*sb + ch*cb

ch=0
ca=1
cb=0
sh=-1
sa=0
sb=-1

 

0 1 0
0 0 1
1 0 0

metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover us uk de jp fr caVisualizing Quaternions by Andrew J. Hanson

Other Math Books

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.