Jump to content
  • Advertisement
Sign in to follow this  

Remove rotation around a given axis.

This topic is 4356 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, If I have a rotation matrix (or quaternion if its easier?) and an axis, is there anyway I can remove any rotation done around that axis from the matirx. Its for a rotating wheel and I want to be able to ignore any rotation around the rolling axis. Any suggestions would be great!! Cheers, Mark.

Share this post

Link to post
Share on other sites
How a rotation happens:
b = R*a

Notation: "~" means "inverse". Ie: ~X is the inverse of X.

An axis is associated with a rotation -- namely, a rotation that rotates the axis to point along a basis vector.

Let X be the rotation that is associated with your axis and the basis vector "1 unit strait up" (aka, Z). X rotates your axis to align with the Z axis.

Then define R` := X*R*~X

R` is "the rotation R in a rotated space".

X*b = R`*X*a

What is the point of all of this?

Well, the rotation R` corresponds very closely with your rotation R. But in the space that R` acts on, the axis you want to remove rotation on is the Z axis!

Removing all rotation along a basis vector isn't all that hard of a problem. Let U` be R` with all rotation around the Z axis removed.

Now, define
U := ~X*U`*X

And U is the rotation matrix R with all rotation around the axis in question removed.

Can you figure out how to remove all rotation around the Z asis from a rotation matrix or a quaternion?

Share this post

Link to post
Share on other sites
If it is in the context of a physics engine, you may have to set moment of inertia around that axis to be infinite, or you might get some weird result if you just cancel the rotation.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • 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!