I have calculated an axis angle rotations for each axis. If I only apply one of the three rotations, the objects rotates as expected.
If I multiply the rotation matrixes, as you would normally do it if you combine rotations I don't get the desired result, cause the first rotation affects the others and therefore the end result is not what I'm looking for.
I want to apply each rotation to the object as if it wasn't rotated before.
I guess this is a simple task, but it seems that I'm not searching for the right keywords. (Also the title is not perfect ... (open for suggestions))
Thanks for every hint / help.
Usually an axis vector and a rotation angle is enough to get a rotation matrix. once you have your 3 matrix you can express them as quaternions, multiply them together then express that result into another rotation matrix.
Rotations in two dimensions are relatively easy, we can represent the rotation angle by a single scalar quantity, rotations can be combined by adding and subtracting the angles.
To combine two Euler Angle rotations, you need to convert them into rotation matrices first and then multiply them together. Afterward, you can convert the product matrix to Euler Angle representation.
Rotations About The Same Axis In 3D Are Also Commutative — In general, the composition of 3D rotations is not commutative.
You're experiencing gimbal lock. It's not a maths problem, it's a logical fallacy. Try it with, for the sake of description, your phone:
But:
Which of those is incorrect if the instruction was to rotate 180 degrees around x and 90 degrees clockwise around z? Neither is incorrect. The instructions were ambiguous.
The order of individual rotations always matters, because the second affects the work done in the first, the third affects the work done in the first and second, etc. Shuffling the order just changes which affects which.
Orientation is normally stored directly as a matrix or as a quaternion because it's unambiguous and because it keeps the order of actions properly ordered.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With