In three-dimensional
spherical coordinates, which are often used in
vector analysis, the coordinates are as follows:
- The radial coordinate r, describing the distance from the origin, and ranging from zero to infinity.
- Two angular coordinates: (1)the polar angle θ(theta), which starts at the positive z-axis and ranges from zero to π(pi); and (2)the azimuthal angle φ(phi), which is restricted to the xy plane, starts at the positive x-axis, and ranges from zero to 2π. Both are, of course, measured in radians.
Occasionally, a different
notation is used with θ being used to denote the azimuthal rather than the polar angle, and vice versa. It is equivalent to the one given here. Also (thanks
unperson), the polar angle can be measured starting from the
equator rather than the pole, with a range of values from -π/2 to π/2.
To transform a vector in spherical coordinates to Cartesian coordinates, use
- x = r*sin(θ)*cos(φ)
- y = r*sin(θ)*sin(φ)
- z = r*cos(θ)