Advertisement

Direction Vector from Euler Angles

Started by June 21, 2016 10:04 PM
2 comments, last by JohnnyCode 8 years, 2 months ago

I have 3 angles - x, y and z rotations. I need to get the direction vector for 3 local axis - x, y and z. Sounds simple, right? However, I can't find any signs of info about this in 3D. It's only telling about single angle(for 2D) everywhere, but not for 3 angle sets(3D). So how do I do it?

http://stackoverflow.com/questions/1568568/how-to-convert-euler-angles-to-directional-vector

Advertisement

You can apply the three rotations to the vectors (1,0,0), (0,1,0) and (0,0,1) and see where they end up. You either need that or the same thing but applying the inverse of the rotation, I am not sure from your post.

You can construct multiple rotations from the euler angles, depending on the order of consecutive rotations (their multiplications that is).

If you know your order, just construct your rotation matrix and then the three columns of this matrix are exactly the direction unit vectors of respective axises when they are rotated with it.

While also, the rows of this rotation matrix are direction vectors of axises when they undercome inverse of rotation, or you can interpret the rows as directions of original axises in new base space - if the new rotation becomes the base.

This topic is closed to new replies.

Advertisement