I'm having a problem working out how to solve a problem.
My problem involves getting the 3D representation of an objects angle, and then applying a rotation to that object on it's own axis.
For example, an aircraft with:
That is rotated across it's own yaw axis through -90 degrees should then be roughly:
(As calculated purely off guesstimation using another program to make the aircraft a child of itself and rotate through 90 degrees, then trying to match the orientation...)
Can anyone explain how this sort of rotation is calculated? or even point me into the right path as to learning how?
I have tried applying a basic rotation matrix to the angles (as to be used for rotating points about an origin), but it only rotates relative to the base x/y/z axes and not that of the aircraft (so results from above would be (-45,45,45)
For mathematics purposes, the rotation does not concern point co-ordinates, only the 3 representation angles.
I would prefer not to use any external libraries.
Though irrelevant, this will be for a C# application.
Thank you all very much for your help and insight!
The rotation matrix is a good start, but you'll need a Translation matrix as well to get the origin right.
You'll need linear algebra with rotation matrices if you want to do it by hand. It require some mathematics skills.
Basically this (below) states: move the object to the origin of x/y/z/, apply the rotation matrix and put it back at the original position.
I must warn you, it's hard to get it right by hand.
http://en.wikipedia.org/wiki/Translation_%28geometry%29
http://en.wikipedia.org/wiki/Rotation_matrix
As a acquaintance of mine put it once:
r'j(t) = r'0(t) + Ω(t) x [rj(t) - r0(t)]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.