ToSphericalCoordinates
ToSphericalCoordinates[{x, y, z}] gives the {r, θ, ϕ} spherical coordinates corresponding to the Cartesian coordinates {x, y, z}.
Examples
ToSphericalCoordinates[{1, 1, 1}]ToSphericalCoordinates[{0, 0, 5}]Please visit the official Wolfram Language Reference for more details.