View Full Version : Rotate a vector around another vector?

If I have vector A, and I want to rotate it n degrees around vector B, what is the equation for this?

Ax#,Ay#,Az# is pointing somewhere.

Bx#,By#,Bz# is an axis I want to rotate vector A around by n degrees.

CrazyButcher

03-18-2006, 01:19 AM

this is more something for the maths subforum here...

but at http://skal.planet-d.net/demo/matrixfaq.htm

you will find how to construct rotation matrix for angle,axis and then transform the vector A with that matrix

Didn't realize there was a math forum.

I'd like to do this without a matrix. I'm sure it's possible.

CrazyButcher

03-18-2006, 07:36 AM

well you can always "compress" the operations that are done to turn the angle axis to matrix and those which transform the vector with that matrix to just one operation.

Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.