Archived

This topic is now archived and is closed to further replies.

Memir

Adding Rotations [Help, Before My BRAIN EXPLODES]

Recommended Posts

Memir    129
Okay the problem is I have a series of Rotations (X,Y,Z - Theta) That kind, you know the Crazy style [Not Euler system rx,ry,rz). Ok lets say these are my series of Rotations: (where Theta is in Rads) 1,0,0 - 0.2 1,0,0 - 0.3 0,0,1 - 0.1 0,1,0 - 0.4 Ok now assume some guy was using his 3dsMAX, and he rotated his object by 0.2 Rads around the Vector(1,0,0). Then by 0.3 Rads around the Same Vector, then 0.1 Rads around the Vector (0,0,1) etc. What would the final rotation be in terms of (x,y,z - Theta)? Would it be possible to express it in this form, or would another rotation form be required to ''add'' these rotations together (Euler System, Or Quaternions?) Is the any functions which can do this? - I have the feeling Matrix Multiplication could be the answer e.g: SET_MATRIX(mtx,rotation_set[0]); MUL_MATRIX(mtx,rotation_set[1]); . . MUL_MATRIX(mtx,rotation_set[3]); would this way work or would the rotations get ''twisted''/messed up around the wrong axis? after each transformation? /Memir

Share this post


Link to post
Share on other sites
Verminaard    122
If you have a matrix for each of the rotations, I''m pretty sure you can get the final rotation matrix by multiplying them together in the order you want to do them.

i.e. Rotation A, then Translation B, then Scale C, then Rotation D
Final rotation matrix would be A*B*C*D

Share this post


Link to post
Share on other sites
Memir    129
YEAH!!!! - It worked!!! - The Key Frame Data now comes over 100% accurate for Rotation / Scaling / Translation. Of course I still gotta work on the Bezier-Style interpolation, but this shall do for now

Now It''s time to ''Churn'' out some 3D Games!!!!

/Memir

Share this post


Link to post
Share on other sites