I am trying to find a way to rotate a vector with python so that the angle between the z axis and this vector is exactly _x° from the right ortho view and the angle between the z axis and this vector is exactly _y° from the front ortho view.
[![Front ortho]][![Right ortho]]
Using the XYZ Euler rotation system dont look a good way to perform such a rotation since an y rotation will modify the initial x rotation, and rotating around the local y axis after the first x rotation will keep a valid x rotation but give an invalid _y angle from the global point of view.
What i am trying to find is an Axis angle, (or quaternion) were the rotation axis is a combination of global x and y vector ([1,0,0] and [0,1,0]) and a corresponding angle.
In this case if _x==_y , the resulting rotation vector will be [0.5,0.5,0.0] and the corresponding angle will be a little more than _x. But i have some difficulties to figure out the maths to find this vector and this angle for any _x and y between 0 and 89.99° (90 would be a problem for sure), or a built in function in Blender that could give this exact result.
NB: The example given here is based on blender global axis but my problem is actualy to rotate around any two perpendicular vectors (local axis of an object). A basic solution in global referential would be enough to find the solution to my initial problem.