MATLAB: Euler angle calculation

euler angles

Good Morning All,
I am attempting to use euler angles to readjust a coordinate system, the problem is I dont now how to calculate psi, theta and phi that will be used. Say I have a vector of [(x1,y1,z1) (x2,y2,z2)] and wish to denote (x1,y1,z1) as the origin. How can I calculate the euler angles between the origin and the vector? Any suggestions are greatly appreciated.
Thanks,
Mel
A better example is say I have v1=(100,125,150) and v2=(110,132,175). I would use v1 as the origin and calculate the euler angles from v1 to v2.

Best Answer

You cannot calculate a unique set of 3 Euler angles between two vectors. The transformation from one vector to the other has 2 degrees of freedom only, because the rotation around the final vector is undefined.
The two angles of spherical coordinates are sufficient to describe the transformation between two vectors.