Three parameters in spherical coordinate system are ρ, θ, and φ. These are called spherical coordinates and three Cartesian coordinates which are used in rectangular coordinate system are x, y, and z coordinates.
In spherical coordinate system, ρ, θ, and φ coordinates are called radial distance, polar angle and azimuth angle respectively.
Let’s see the relationship between rectangular and spherical coordinates:
'x' component of rectangular coordinates in the form of spherical coordinates is given as:
X = ρ sin (θ) cos (φ),
'y' component may be given as:
Y = ρ sin (θ) sin (φ),
And 'z' component will be derived from
Z = ρ cos (θ),
To convert spherical coordinates into rectangular coordinates, we use Pythagorean Theorem:
ρ = √x2 + y2 + z2,
θ = cos-1 (z/ ρ) = cos-1 (z/ √x2+ y2 + z2) and
φ = tan-1 (y / x).
Let’s try to understand conversion from rectangular to spherical coordinates using following example.
Let rectangular coordinates (√2, 1, 0) be represent by (x, y, z).
Then we can write (x, y, z) = (1, 1,0),
ρ = √x2 + y2 + z2 = 1 + 1 + 0 = 2,
θ = cos-1 (z/ ρ) = cos-1 (0 / 2) = cos-1(0) = π/2,
φ = tan-1 (y / x) = tan-1 (1 / 1) = π/4.