Sign in to follow this  

Point Rotation Result

This topic is 4203 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

An equation to rotate a vector v about a unit-length axis n by an angle t is:
v' = cos(t)(v-(v.n)n)+sin(t)(nXv)+(v.n)n
The derivation involves separating v into components perpendicular and parallel to n, rotating the perpendicular portion, and then re-composing.

The equation is more commonly expressed in matrix form. Googling for 'axis angle matrix' will mostly likely turn up the algorithm for constructing this matrix (just be aware of row vs. column vector issues).

The equivalent quaternion equation is:
v' = q*v*q~
Where v and v' are quaternions whose real part is arbitrary (usually 0) and whose imaginary part corresponds to the vector in question. Note that the above is for quaternions using 'standard' multiplication order; if you were using, say, the DirectX quaternion class, the order of multiplication would be reversed.

Share this post


Link to post
Share on other sites

This topic is 4203 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.

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