How can I draw a tube on basis of position and angle between two 3d points?
The simplest solution is to use a lookat matrix. This is a matrix calculated from a "eye" point, a "target" point and an up vector.

The resulting matrix will then make the Z axis point from the eye to the target and the y axis in the general direction of up.