Analytic geometry - rotation + translation In $K=O\vec{e_1}\vec{e_2}\vec{e_3}$ I have to find the analytical representation of the screw motion( rotation + translation) $\psi$ with a rotation axis $g$ given by the points $A(5,-4,3)$ and $B(0,0,5)$ , the angle of rotation is $\theta=\frac{3\pi}{2}$ and the translation vector is $p\uparrow\uparrow AB,|p|=5$. I have no problem finding the equation of $g$ and the vector $p$. I also know that the matrix of rotation along the axis $Oz$ looks like this:
$$ \begin{pmatrix}
cos\theta & -sin\theta  & 0 \\ 
sin\theta & cos\theta & 0\\ 
0 &0  & 1 
\end{pmatrix}$$
My problem is that $g$ isn't $Oz$ and I don't know what to do to make the rotation matrix be around $g$. Also a step by step solution to this problem is very important to me , because I will have similar problems on my test. All solutions are welcomed. Thanks in advance $\ddot\smile$
 A: $\def\vec#1{\overrightarrow{#1}}$
Let 
$$\vec{u}=\frac{1}{\Vert\vec{AB}\Vert}\vec{AB}=\frac{1}{3\sqrt{5}}\left[\matrix{-5\cr 4\cr 2}\right].$$
Consider any unit vector that is orthogonal to $\vec{u}$, for example
$$
\vec{v}=\frac{1}{\sqrt{5}}\left[\matrix{0\cr -1\cr 2}\right]
$$
Finally, define $\vec{w}=\vec{u}\wedge \vec{v}$,
$$
\vec{w}=\frac{1}{3}\left[\matrix{2\cr 2\cr 1}\right]
$$
So that $(\vec{u}, \vec{v},\vec{w})$ is a direct orthonormal basis of $\mathbb{R}$. The rotation $R$ around $\vec{u}$ of angle $\theta=3\pi/2$ acts on this basis  as follows
$$R(\vec{u})=\vec{u},\quad R(\vec{v})=-\vec{w},\quad R(\vec{w})=\vec{v}.$$
Now, if $(x,y,z)$ are the coordinates of a point $M$ in the canonical basis of $\mathbb{R}^3$ then then
$$\eqalign{\vec{OM}&=(\vec{OM}\cdot \vec{u})\vec{u}+(\vec{OM}\cdot \vec{v})\vec{v}+(\vec{OM}\cdot \vec{w})\vec{w}\cr
&=\frac{-5x+4y+2z}{3\sqrt{5}}\vec{u}+
\frac{-y+2z}{\sqrt{5}}\vec{v}+\frac{2x+2y+z}{3}\vec{w}
}
$$
and consequently, its image $M'$ under the the skew rotation $R$ followed by the translation of vector $\vec{p}=5\vec{u}$, is given by
$$\eqalign{\vec{OM'}&=5\vec{u}+
\frac{-5x+4y+2z}{3\sqrt{5}}\vec{u}-
\frac{-y+2z}{\sqrt{5}}\vec{w}+\frac{2x+2y+z}{3}\vec{v}
}
$$
The final step is just to replace the coordinates of $\vec{u}, \vec{v},\vec{w}$ in the previous expression to obtain the coordinates $(x',y',z')$ of $M'$ in terms of those of $M$, this is simple algebra.$\qquad\square$
