Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Spherical coordinate system
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Coordinate system conversions == {{also|List of common coordinate transformations#To spherical coordinates}} As the spherical coordinate system is only one of many three-dimensional coordinate systems, there exist equations for converting coordinates between the spherical coordinate system and others. === Cartesian coordinates === The spherical coordinates of a point in the ISO convention (i.e. for physics: radius {{mvar|r}}, inclination {{mvar|θ}}, azimuth {{mvar|φ}}) can be obtained from its [[Cartesian coordinate system|Cartesian coordinates]] {{math|(''x'', ''y'', ''z'')}} by the formulae <math display="block">\begin{align} r &= \sqrt{x^2 + y^2 + z^2} \\ \theta &= \arccos\frac{z}{\sqrt{x^2 + y^2 + z^2}} = \arccos\frac{z}{r}= \begin{cases} \arctan\frac{\sqrt{x^2+y^2}}{z} &\text{if } z > 0 \\ \pi +\arctan\frac{\sqrt{x^2+y^2}}{z} &\text{if } z < 0 \\ +\frac{\pi}{2} &\text{if } z = 0 \text{ and } \sqrt{x^2+y^2} \neq 0 \\ \text{undefined} &\text{if } x=y=z = 0 \\ \end{cases} \\ \varphi &= \sgn(y)\arccos\frac{x}{\sqrt{x^2+y^2}} = \begin{cases} \arctan(\frac{y}{x}) &\text{if } x > 0, \\ \arctan(\frac{y}{x}) + \pi &\text{if } x < 0 \text{ and } y \geq 0, \\ \arctan(\frac{y}{x}) - \pi &\text{if } x < 0 \text{ and } y < 0, \\ +\frac{\pi}{2} &\text{if } x = 0 \text{ and } y > 0, \\ -\frac{\pi}{2} &\text{if } x = 0 \text{ and } y < 0, \\ \text{undefined} &\text{if } x = 0 \text{ and } y = 0. \end{cases} \end{align}</math> The [[inverse tangent]] denoted in {{math|''φ'' {{=}} arctan {{sfrac|''y''|''x''}}}} must be suitably defined, taking into account the correct quadrant of {{math|(''x'', ''y'')}}, as done in the equations above. See the article on [[atan2]]. Alternatively, the conversion can be considered as two sequential [[Polar coordinate system#Converting between polar and Cartesian coordinates|rectangular to polar conversions]]: the first in the Cartesian {{mvar|xy}} plane from {{math|(''x'', ''y'')}} to {{math|(''R'', ''φ'')}}, where {{mvar|R}} is the projection of {{mvar|r}} onto the {{mvar|xy}}-plane, and the second in the Cartesian {{mvar|zR}}-plane from {{math|(''z'', ''R'')}} to {{math|(''r'', ''θ'')}}. The correct quadrants for {{mvar|φ}} and {{mvar|θ}} are implied by the correctness of the planar rectangular to polar conversions. These formulae assume that the two systems have the same origin, that the spherical reference plane is the Cartesian {{mvar|xy}} plane, that {{mvar|θ}} is inclination from the {{mvar|z}} direction, and that the azimuth angles are measured from the Cartesian {{mvar|x}} axis (so that the {{mvar|y}} axis has {{math|''φ'' {{=}} +90°}}). If ''θ'' measures elevation from the reference plane instead of inclination from the zenith the arccos above becomes an arcsin, and the {{math|cos ''θ''}} and {{math|sin ''θ''}} below become switched. Conversely, the Cartesian coordinates may be retrieved from the spherical coordinates (''radius'' {{mvar|r}}, ''inclination'' {{mvar|θ}}, ''azimuth'' {{mvar|φ}}), where {{math|''r'' ∈ {{closed-open|0, ∞}}}}, {{math|''θ'' ∈ {{closed-closed|0, {{pi}}}}}}, {{math|''φ'' ∈ {{closed-open|0, 2{{pi}}}}}}, by <math display="block">\begin{align} x &= r \sin\theta \, \cos\varphi, \\ y &= r \sin\theta \, \sin\varphi, \\ z &= r \cos\theta. \end{align}</math> === Cylindrical coordinates === {{main|Cylindrical coordinate system}} <!-- if you notice--rho and r are described opposite of convention here--someone with extra time could remedy this --> [[cylindrical coordinate system|Cylindrical coordinates]] (''axial'' ''radius'' ''ρ'', ''azimuth'' <!--radians--> ''φ'', ''elevation'' ''z'') may be converted into spherical coordinates (''central radius'' ''r'', ''inclination'' ''θ'', ''azimuth'' ''φ''), by the formulas <math display="block">\begin{align} r &= \sqrt{\rho^2 + z^2}, \\ \theta &= \arctan\frac{\rho}{z} = \arccos\frac{z}{\sqrt{\rho^2 + z^2}}, \\ \varphi &= \varphi. \end{align}</math> Conversely, the spherical coordinates may be converted into cylindrical coordinates by the formulae <math display="block">\begin{align} \rho &= r \sin \theta, \\ \varphi &= \varphi, \\ z &= r \cos \theta. \end{align}</math> These formulae assume that the two systems have the same origin and same reference plane, measure the azimuth angle {{mvar|φ}} in the same senses from the same axis, and that the spherical angle {{mvar|θ}} is inclination from the cylindrical {{mvar|z}} axis.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)