I'm doing this side project and got stuck at a geometrical task. It's been a long time since my math classes and I'm a little rust. How would I go about to write $x$, $y$, $z$ as functions of $r$, $\theta_1$, $\theta_2$?
$r$ is the distance of the point to the origin, $\theta_1$ is a rotation along the $y$ axis, and $\theta_2$ is a rotation along the $x$ axis.
Image representing the problem.
I tried spherical coordinates, but I don't think it is a good fit, since in this system only one of the rotations is along one of the cartesian axes. Maybe something more similar to conical?
Thanks in advance!
It sounds like you are describing spherical coordinates.
If your goal is to find the vector $(x,y,z)$ that you get from the parameters, $r$, $\theta_1$ and $\theta_2$, then one way to approach this is to see it as two rotations applied to a vector of the desired length.
So you can start with whatever vector you want get when $\theta_1$ and $\theta_2$ are zero, e.g. $v = (r,0,0)$
The final vector can be found by multiplying v by two rotation matrices:
$R_2 R_1 v$
where $R_1$ and $R_2$ are 3x3 rotation matrices representing rotation of the angles $\theta_1$ and $\theta_2$ around whichever axes you like (e.g. a rotation around Z followed by a rotation around X)
I won't post the coordinates that are in the 3x3 rotation matrices, but they are easily found, e.g. here