Rotation Matrix given angle and point in X,Y,Z

The complete rotation matrices are derived and given at https://sites.google.com/site/glennmurray/glenn-murray-ph-d/rotation-matrices-and-formulas/rotation-about-an-arbitrary-axis-in-3-dimensions.

From the paper:

5.2 The simplified matrix for rotations about the origin

Note this assumes that (u, v, w) is a direction vector for the axis of rotation and that u^2 + v^2 + w^2 = 1.

Simplified 3D matrix for rotations about the origin.

If you have a point (x, y, z) that you want to rotate, then we can obtain a function of of seven variables that yields the rotated point:

f(x, y, z, u, v, w, theta) =

Formula for rotated point.

The paper also includes matrices and formulas for rotations about an arbitrary axis (not necessarily through the origin), Java code available under the Apache license, and a link to a web app that illustrates rotations.

Leave a Comment