3D rotation about an arbitrary axis

Published on: by David Dibben

Updated on: • 1 min read

I often need to do some geometric calculations involving rotation of a vector about an axis. However, not often enough to have the matrices for the rotation to hand. The calculation is not particularly difficult and is described in many places, but last time I needed this I found a very good write-up by Glenn Murray:

http://inside.mines.edu/~gmurray/ArbitraryAxisRotation/

Not only is this an easy-to-follow description, it also has the final rotation matrices, which makes it very easy to code.

(PDF archive version of the page: pdf)