Coords

Conventions

All angular coordinates are defined in radians.

Polar Coordinates

Polar coordinates are related to 2D cartesian coordinates by the relations

\[\begin{split}& x = r\cos(\phi) + x_{0},\\ & y = r\sin(\phi) + y_{0},\end{split}\]

where \(x_{0}\) and \(y_{0}\) define the center of the polar coordinate grid. The polar coordinates \(r\) lies in the range \([0, \infty)\) while \(\phi\) lies in the range \([0, 2\pi)\). The conversion from 2D cartesian coordinates to polar is given by

\[\begin{split}& r = \sqrt{(x-x_{0})^{2} + (y-y_{0})^{2}},\\ & \phi = \arctan \left(\frac{y-y_{0}}{x-x_{0}}\right).\end{split}\]

Note

This means \(\phi=0\) lies along the x-axis i.e. y=0.

Spherical Polar Coordinates

API