#How to multiple two rotation matrixes togheter
33 messages · Page 1 of 1 (latest)
Depending on what you’re doing, you should be able to just add the angles in a new rotation matrix
im rotating a cube first 45 degrees around the z axis and then 45 degrees around the x axsis but i wanna combine theese two rotation matrixes to skip extra steps.
Oh then it’s slightly different
What are your two matrices, since you already said the angles are fixed
Then you can deal with the matrix as usual, with explicit values in case you’re not already doing that
its just the x matrix and z matrix when i combine them i get this
cos 45 , 0 , 0
0 ,cos(45) * cos(45) , 0
0 , 0 , cos(45)
How exactly are you combining them?
i just mutliple them togheter
I mean show your work
Since apparently you’re not doing it right if I understand you correctly?
i did it on a piece of paper but its really hard to understand since i did most of the work in my head
i dont think im doing it right either, its just something i came up with on the spot
So what do you want help with?
i wanna know how to combine two matrixes togheter
So give me your two matrices and I’ll show you
Also the order in which you do it matters
You want to multiple them in the order (x matrix) ( z matrix ), do you see why?
its just the rotation matrix for Z and Y
i mean Z and X
and i wanna start with Z first
When multiplying matrices, you dot the row and columns, and the index of of each row and colum corresponds to which element
So for the first element of our product
We will dot (1,0,0) (the first row of the x matrix)
And (cos theta, sin theta, 0) (the first column of the z matrix)
What number do you get when you dot these?
When I say dot I mean dot product btw
ahaaaa, its just how you caculate a regulat matrix, we did learn about matrix multiplication but i was thinking outside of the problem that it didnt occur in my mind ahahha, thanks for clarifying it