ToSphericalCoordinates[{x,y,z}]
gives the {r,θ,ϕ} spherical coordinates corresponding to the Cartesian coordinates {x,y,z}.
ToSphericalCoordinates
ToSphericalCoordinates[{x,y,z}]
gives the {r,θ,ϕ} spherical coordinates corresponding to the Cartesian coordinates {x,y,z}.
Details
- ToSphericalCoordinates produces points in the standard range
,
,
. - ToSphericalCoordinates automatically threads over arrays of {x,y,z} triples.
Examples
open all close allBasic Examples (2)
Scope (2)
Properties & Relations (4)
ToSphericalCoordinates[pt] is a special case of CoordinateTransform:
CoordinateTransform["Cartesian" -> "Spherical", {x, y, z}] == ToSphericalCoordinates[{x, y, z}]ToSphericalCoordinates inverts FromSphericalCoordinates:
Simplify[ToSphericalCoordinates[FromSphericalCoordinates[{r, θ, φ}]], r > 0 && 0 < θ < Pi && -Pi < φ < Pi]ToSphericalCoordinates[{x,y,z}] uses spherical coordinates about the
axis:
ToSphericalCoordinates[{x, y, z}]ToPolarCoordinates[{x,y,z}] uses spherical coordinates about the
axis:
ToPolarCoordinates[{x, y, z}]The spherical coordinates used by ToPolarCoordinates generalize to higher dimensions:
ToPolarCoordinates[{w, x, y, z}]ToSphericalCoordinates changes the coordinate values of points:
ToPolarCoordinates[{x, y, z}]TransformedField changes the coordinate expressions for fields:
TransformedField["Cartesian" -> "Spherical", {x, y, z}, {x, y, z} -> {r, θ, φ}]//SimplifyRelated Guides
History
Text
Wolfram Research (2015), ToSphericalCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/ToSphericalCoordinates.html.
CMS
Wolfram Language. 2015. "ToSphericalCoordinates." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ToSphericalCoordinates.html.
APA
Wolfram Language. (2015). ToSphericalCoordinates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ToSphericalCoordinates.html
BibTeX
@misc{reference.wolfram_2026_tosphericalcoordinates, author="Wolfram Research", title="{ToSphericalCoordinates}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/ToSphericalCoordinates.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_tosphericalcoordinates, organization={Wolfram Research}, title={ToSphericalCoordinates}, year={2015}, url={https://reference.wolfram.com/language/ref/ToSphericalCoordinates.html}, note=[Accessed: 13-June-2026]}