I have a general line segment with endpoints $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ referenced to a 3D Cartesian coordinate frame E. I wish to rotate this coordinate fram E to a new coordinate system F such that the new $x$-axis is parallel to this line segment.
Basically, I am looking for three unique Euler angles $(\alpha,\beta,\gamma)$, using the usual $z-y'-z''$ convention, in terms of the coordinates for the two endpoints in the original coordinate frame. Therefore, in the new coordinate frame, I will have three equations to satisfy: 1. $y_1''' = y_2'''$, 2. $z_1''' = z_2'''$, and 3. $(x_2'''- x_1''')^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2$