Jump to content
  • Advertisement

Archived

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

ViperDigital

3 axis angle rot = 1?

This topic is 5891 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone. If I do 3 axis-angle rotations. say for example if i have an axis for x y and z axis (local) and I want to rotate 3 times say first around the x then around the y then around the z each with their own angles. Is there a way to combine all of these into just 1 axis-angle rotation? I hope this makes sense. Sincerely, Scott ViperDigital.

Share this post


Link to post
Share on other sites
Advertisement
Each rotation has a specified matrix
In 4x4 matrix representation :
around x: (matrix X)
( 1 0 0 0 )
( 0 cos(angle) -sin(angle) 0 )
( 0 sin(angle) cos(angle) 0 )
( 0 0 0 1 )

around y: (matrix Y)
( cos(angle) 0 sin(angle) 0 )
( 0 0 0 0 )
(-sin(angle) 0 cos(angle) 0 )
( 0 0 0 1 )

around z: (matrix Z)
( cos(angle) -sin(angle) 0 0 )
( sin(angle) cos(angle) 0 0 )
( 0 0 0 0 )
( 0 0 0 1 )

When you calculate X*Y*Z (you have one matrix to rotate about 3 axis :-)))


Share this post


Link to post
Share on other sites
i think he wants to know how to rotate around an arbitary axis. actually i wish i knew too other than the terrible solution: say if you want to rotate about the axis x,y,z by the angles A,B,C, well you can do A/n,B/n,c/n n times. so long as n is a big number.

and the final alignment will be the same whatever order your rotation steps occur.

i think. its a vague memory i have from physics.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!