I know this is rather trivial question but it's not homework! I need this as part of a bigger project. What I have to do is rotate my reference frame to another one. I want my new z-axis to be a vector Z=(Z1,Z2,Z3) Following the notation of this wikipage: http://en.wikipedia.org/wiki/Euler_angles all I need to do is compute the Euler angles, however, I don't manage to get Y3 and therefore the last angle, gamma. Can you please help?