I am a bit confused right now in 3D rotations. I have searched this question in many different ways but have not found a resource that could help me mentally/visually understand what is going on.
I'm familiar with matrices and utilizing them quite frequently in graphics, but this particular situation is making me realize I have a flaw in my reasoning at a base level.
I want to take two 3D (3x3 rotational information stored in a 4x4 matrix with last column and row staying as 0, 0, 0, 1 in the following examples) rotational matrices and combine them to perform a rotation in this order: x-axis then y-axis.
so I simply multiply them together to perform the operation. When I apply the matrices individually against a vector of [1, 1, 1, 1] I get the expected results:
Assuming +x toward the screen, +z to the right, +y is up
x-axis matrix (of 90 degrees) produces [1, -1, 1, 1] (a clockwise spin of the x-axis)
y-axis matrix (of 90 degrees) produces [1, 1, -1, 1] (a clockwise spin of the y-axis)
Now when I combine the matrices to rotate x then y and apply it against my vector (both still represent 90 degrees on their respective axis) it produces [1, 1, 1, 1].
I have tested this result against many online calculators that express this result as correct; however, to achieve that result would mean you did a counter-clockwise spin on the x-axis and a counter-clockwise spin on the y-axis.
I do not understand why this is happening. Again as a mental model...mathematically it just works just fine, but it really breaks down some of my perceptions on ordered rotations.
I feel like this has to deal with gimble lock somehow, just not sure how it plays into this especially since I split up the rotations and applied it to my vector one step at a time an lo! The result is more what I expected.