| further reading | more topics » |
| mjbWorld program | 3D theory |
3D physics |
3D maths |
3D programming | technology |
about site |
sitemap A-Z |
| index | algebra | geometry | calculus | graph theory | statistics | principles | standards |
index |
space |
elements |
surface |
transformations | trigonometry |
||
| rotation | affine | theory | |||||
index |
angles |
euler |
axis angle |
direction cosines | convertions |
frame-of- reference |
as 2 reflections |
This depends on what conventions are used for the Euler Angles. The following are derived on the euler angle page, the first assumes NASA Standard Airplane:
| [R] = |
|
Or, from the same page, this uses NASA Standard Airplane taking angles in the reverse order:
| [R] = |
|
Java code to do conversion:
/** this conversion uses NASA standard aeroplane conventions as described on page:
* http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm
* Coordinate System: right hand
* Positive angle: right hand
* Order of euler angles: [R3][R2][R1] = [about z][about y][about x] = [bank][attitude][heading]
* matrix row column ordering:
* [m00 m01 m02]
* [m10 m11 m12]
* [m20 m21 m22]*/
public final void rotate(double heading, double attitude, double bank) {
// Assuming the angles are in radians.
double c1 = Math.cos(heading);
double s1 = Math.sin(heading);
double c2 = Math.cos(attitude);
double s2 = Math.sin(attitude);
double c3 = Math.cos(bank);
double s3 = Math.sin(bank);
m00 = c1 * c2;
m01 = -s1 * c2;
m02 = s2;
m10 = s1 * c3+(c1 * s2 * s3);
m11 = (c1*c3) - (s1 * s2 * s3);
m12 = -c2 * s3;
m20 = (s1 * s3) - (c1 * s2 * c3);
m21 = (c1 * s3) + (s1 * s2 * c3);
m22 = c2*c3;
}
| we take the 90 degree rotation from this: | to this: | ![]() |
As shown here the axis angle for this rotation is:
heading = 0 degrees
bank = 90 degrees
attitude = 0 degrees
so substituteing this in the above formula gives:
| [R] = |
|
| [R] = |
|
This agrees with the matix rotations here.
|
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. |
|
|
Commercial Software Shop Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them. |
|
|
Can you help? Please send me any improvements to here. I would appreciate ideas to make the pages more useful including error correction, ideas for new pages, improvements to wording. It helps if you quote the full URL of the page. |
|
|
progam I am working on a project which uses these principles, if you would like to help me with this you are welcome to join in, here: |
|
This site may have errors. Don't use for critical systems.
Copyright (c) 1998-2008 Martin John Baker - All rights reserved - privacy policy.