2
$\begingroup$

I have a 3d vector r known by its coordinates rx, ry, rz. How can calculate angles Theta and Phi ?

enter image description here

$\endgroup$
  • 1
    $\begingroup$ $\varphi = \arctan(y/x)$ and $\theta = \arccos(z/r)$. $\endgroup$ – Jacky Chong Apr 22 '17 at 20:05
  • $\begingroup$ Thanks ! I have a cube at pos (0,0,0) whose x-axis I want to orient in the same direction than r, by what coordinates should I rotate the cube (maya software) ? (0,φ,θ) ? $\endgroup$ – Laurent Crivello Apr 22 '17 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.