For two dimensional rotation of $x$ and $y$ axes anticlockwise by $\varphi$, the equation that transforms $P(x,y) \rightarrow P(x',y')$, $x'=x \cos(\varphi)+y \sin(\varphi)$ and $y'=y \cos(\varphi)- x \sin(\varphi)$ are nice enough, but when I tried to do this for $\varphi$ and $\theta$ in three dimensions (that is, another iteration of the same thing) the result was horribly ugly.
So, starting and ending with a Cartesian point, what's the most elegant way of stating the ending co-ordinates as a function of the starting co-ordinates and other things, like the angle of rotation about various axes?