How to find angle between $2$ points in $3D$ space? I think I am not able to convey what I need so here is the edited question:  
 
As you can see in the image, a point on the left is at $(-3,-3,0)$ and the point on the right is at $(3,3,0)$.
And when I draw the cylinder it spawns at $(0,0,0)$, the center point of the cylinder is at $(0,0,0)$ and size of the cylinder is the distance between $2$ points. Now my goal is to rotate the cylinder in all $x$, $y$ and $z$-axis so that it connects both the points. 
Here this is a $2$D image so I know that I will need to rotate this only in z-axis but I want a generalized for the points anywhere in the coordinate system.

Angle between $(a,b,c)$ and $(x,y,z)$ is given by,
$$\cos\theta =\frac{ax+by+cz}{\sqrt{a^2+b^2+c^2}\sqrt{x^2+y^2+z^2}}$$
The unit vector from $(a,b,c)$ to $(x,y,z)$ will be$$\frac{a-x}{\sqrt{a^2+b^2+c^2}\sqrt{x^2+y^2+z^2}}i+\frac{b-y}{\sqrt{a^2+b^2+c^2}\sqrt{x^2+y^2+z^2}}j+\frac{c-z}{\sqrt{a^2+b^2+c^2}\sqrt{x^2+y^2+z^2}}k$$
Here the $i^{th}$ term is Cosine of angle with x-axis,
$j^{th}$ term is Cosine of angle with y-axis ,
$k^{th}$ term is Cosine of angle with z-axis.
