How to extract the Euler rotation angles used to transform a point?

36 Views Asked by At

If you rotate an input point located on the Y axis around the X axis, and then around the Z axis, you get a new point at a new location.

However, how do you do the opposite? I.e. start with the new point and determine the two rotation angles needed to arrive at the original input point located on the Y axis?

Also, is there a general method that can be used for rotations starting on and rotated around other axes?