Sign in to follow this  
FlorianapoliS

Remove rotation around a given axis.

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".

Note:
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this