I have two points $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ representing the ends of an arc. But I also have intermediate points in-between these end points along the arc. I intend to find out the rotation matrix required to align the z-axis parallel to the line joining $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$. I also want know the resulting vector positions of all the intermediate points on this arc after applying the rotation matrix to align the z-axis parallel to the line $(x_2-x_1,y_2-y_1,z_2-z_1). $
Although there have been similar questions answered, I am still not clear with the whole concept and would appreciate a little more details, especially how the rotation matrix is formed.