# Explicit calculation of 3x3 rotation matrix from combining three angle-unit axis rotations?

I need to remove dependence on a programming library from a computer application I'm working on and instead hand code a geometric operation. Please can you show explicitly (for someone with little experience of geometry) the primitive steps to calculate a 3x3 rotation matrix from the composition of three angle (in radians)- unit axis pairs?

Example input:

0.005 radians, (1, 0, 0) -0.0003 radians, (0, 1, 0) 0.02 radians, (0, 0, 1)

and output should be a 3 x 3 matrix?

-
It depends on a couple of things: (1) What order do you do the rotations? i.e. Do you first rotate about $x$, then rotate the result about $y$, then the result of that about $z$, or vice versa, or something else? (2) Are your points represented as column vectors, $v=\begin{bmatrix}x\\y\\z\end{bmatrix}$ and you apply a matrix $A$ by computing $Av$, or are points row vectors $v=\begin{bmatrix}x&y&z\end{bmatrix}$ and you do $vA$? –  Rahul Aug 2 '12 at 22:26
Anyway, take a look at what Wikipedia says about rotation matrices in three dimensions. –  Rahul Aug 2 '12 at 22:28
Wikipedia 'Euler angles' provides plenty of details. –  Raymond Manzoni Aug 2 '12 at 22:29
You've seen the Rodrigues rotation formula, I take it? Assemble your three matrices and multiply them out (minding order, as @Rahul says). –  Ｊ. Ｍ. Aug 3 '12 at 3:54