orld.wolfram.com/SphericalCoordinates.html">spherical coordinates.
The conventions used here are the mathematical ones, i.e. spherical coordinates are related to Cartesian coordinates as follows:
- x = r cos(θ) sin(Φ)
- y = r sin(θ) sin(Φ)
- z = r cos(Φ)
- r = √(x2+y2+z2)
- θ = atan2(y, x)
- Φ = acos(z/r)
r is the radius, θ is the azimuthal angle in the x-y plane and Φ is the polar (co-latitude) angle. These conventions are different from the conventions used in physics (and in particular in spherical harmonics) where the meanings of θ and Φ are reversed.
This class provides conversion of coordinates and also of gradient and Hessian between spherical and Cartesian coordinates.
@since 3.2