Hi there,(adsbygoogle = window.adsbygoogle || []).push({});

I am getting confused about how to work this out.

I know that to convert cartesian coordinates to spherical coordinates you can use:

theta=arccos(z)

phi=arcsin(y/sin(theta))

my problem is that I have a list of coordinates, lets call them THETA and PHI. I change them into X,Y,Z and then rotate them by 2 Euler angles.

THETA is in the range(0->2pi)

PHI is in the range (-pi/2->pi/2).

the problem is once I have completed the transforms I want the new value theta, As it is found using arccos the value returned is only in the range 0->pi, the values come back between 0 and 180, where as the THETA values are between 0 and 360, and therefore I want my transformed values to be in the range 0 to 360. I think I need to use quadrants but I have been searching the internet and can't find the info I need.

Any help would be greatly appreciated.

**Physics Forums - The Fusion of Science and Community**

# Cartesian to spherical polar coordinates

Have something to add?

- Similar discussions for: Cartesian to spherical polar coordinates

Loading...

**Physics Forums - The Fusion of Science and Community**