Cylindrical coordinate system

A cylindrical coordinate system is a three-dimensional coordinate system that specifies point positions by the distance from a chosen reference axis (axis L in the image opposite), the direction from the axis relative to a chosen reference direction (axis A), and the distance from a chosen reference plane perpendicular to the axis (plane containing the purple section). The latter distance is given as a positive or negative number depending on which side of the reference plane faces the point.

The origin of the system is the point where all three coordinates can be given as zero. This is the intersection between the reference plane and the axis. The axis is variously called the cylindrical or longitudinal axis, to differentiate it from the polar axis, which is the ray that lies in the reference plane, starting at the origin and pointing in the reference direction. Other directions perpendicular to the longitudinal axis are called radial lines.

The distance from the axis may be called the radial distance or radius, while the angular coordinate is sometimes referred to as the angular position or as the azimuth. The radius and the azimuth are together called the polar coordinates, as they correspond to a two-dimensional polar coordinate system in the plane through the point, parallel to the reference plane. The third coordinate may be called the height or altitude (if the reference plane is considered horizontal), longitudinal position, or axial position.

Cylindrical coordinates are useful in connection with objects and phenomena that have some rotational symmetry about the longitudinal axis, such as water flow in a straight pipe with round cross-section, heat distribution in a metal cylinder, electromagnetic fields produced by an electric current in a long, straight wire, accretion disks in astronomy, and so on.

They are sometimes called "cylindrical polar coordinates" and "polar cylindrical coordinates", and are sometimes used to specify the position of stars in a galaxy ("galactocentric cylindrical polar coordinates").

Definition
The three coordinates ($O$, $A$, $L$) of a point $r$ are defined as:
 * The radial distance $θ$ is the Euclidean distance from the $z$-axis to the point $ρ$.
 * The azimuth $φ$ is the angle between the reference direction on the chosen plane and the line from the origin to the projection of $z$ on the plane.
 * The axial coordinate or height $P$ is the signed distance from the chosen plane to the point $ρ$.

Unique cylindrical coordinates
As in polar coordinates, the same point with cylindrical coordinates $ρ = 4$ has infinitely many equivalent coordinates, namely $φ = 130°$ and $z = 4$ where $z$ is any integer. Moreover, if the radius $P$ is zero, the azimuth is arbitrary.

In situations where someone wants a unique set of coordinates for each point, one may restrict the radius to be non-negative ($(r,θ,z)$) and the azimuth $φ$ to lie in a specific interval spanning 360°, such as $Z = v_{bz}t$ or $(ρ, φ, z)$.

Conventions
The notation for cylindrical coordinates is not uniform. The ISO standard 31-11 recommends $(ρ, φ ± n×360°, z)$, where $P$ is the radial coordinate, $z$ the azimuth, and $P$ the height. However, the radius is also often denoted $n$ or $ρ$, the azimuth by $φ$ or $ρ$, and the third coordinate by $φ$ or (if the cylindrical axis is considered horizontal) $z$, or any context-specific letter.





In concrete situations, and in many mathematical illustrations, a positive angular coordinate is measured counterclockwise as seen from any point with positive height.

Coordinate system conversions
The cylindrical coordinate system is one of many three-dimensional coordinate systems. The following formulae may be used to convert between them.

Cartesian coordinates
For the conversion between cylindrical and Cartesian coordinates, it is convenient to assume that the reference plane of the former is the Cartesian $r$-plane (with equation $(−ρ, φ ± (2n + 1)×180°, z),$), and the cylindrical axis is the Cartesian $s$-axis. Then the $θ$-coordinate is the same in both systems, and the correspondence between cylindrical $ρ ≥ 0$ and Cartesian $[−180°,+180°]$ are the same as for polar coordinates, namely $$ \begin{align} x &= \rho \cos \varphi \\ y &= \rho \sin \varphi \\ z &= z \end{align} $$ in one direction, and $$\begin{align} \rho &= \sqrt{x^2+y^2} \\ \varphi &= \begin{cases} \text{indeterminate} & \text{if } x = 0 \text{ and } y = 0\\ \arcsin\left(\frac{y}{\rho}\right) & \text{if } x \geq 0 \\ -\arcsin\left(\frac{y}{\rho}\right) + \pi & \mbox{if } x < 0 \text{ and } y \ge 0\\ -\arcsin\left(\frac{y}{\rho}\right) + \pi & \mbox{if } x < 0 \text{ and } y < 0 \end{cases} \end{align}$$ in the other. The arcsine function is the inverse of the sine function, and is assumed to return an angle in the range $[0,360°]$ = $(ρ, φ, z)$. These formulas yield an azimuth $t$ in the range $(ρ, φ, z)$.

By using the arctangent function that returns also an angle in the range $ρ = 2$ = $z = 1$, one may also compute $$\varphi$$ without computing $$\rho$$ first $$\begin{align} \varphi &= \begin{cases} \text{indeterminate} & \text{if } x = 0 \text{ and } y = 0\\ \frac\pi2\frac y{|y|} & \text{if } x = 0 \text{ and } y \ne 0\\ \arctan\left(\frac{y}{x}\right) & \mbox{if } x > 0 \\ \arctan\left(\frac{y}{x}\right)+\pi & \mbox{if } x < 0 \text{ and } y \ge 0\\ \arctan\left(\frac{y}{x}\right)-\pi & \mbox{if } x < 0 \text{ and } y < 0 \end{cases} \end{align}$$ For other formulas, see the article Polar coordinate system.

Many modern programming languages provide a function that will compute the correct azimuth $h$, in the range $φ = −60°$, given x and y, without the need to perform a case analysis as above. For example, this function is called by atan2(y, x) in the C programming language, and (atan y x) in Common Lisp.

Spherical coordinates
Spherical coordinates (radius $x$, elevation or inclination $z$, azimuth $x$), may be converted to or from cylindrical coordinates, depending on whether $P$ represents elevation or inclination, by the following:

Line and volume elements
In many problems involving cylindrical polar coordinates, it is useful to know the line and volume elements; these are used in integration to solve problems involving paths and volumes.

The line element is $$\mathrm{d}\boldsymbol{r} = \mathrm{d}\rho\,\boldsymbol{\hat{\rho}} + \rho\,\mathrm{d}\varphi\,\boldsymbol{\hat{\varphi}} + \mathrm{d}z\,\boldsymbol{\hat{z}}.$$

The volume element is $$\mathrm{d}V = \rho\,\mathrm{d}\rho\,\mathrm{d}\varphi\,\mathrm{d}z.$$

The surface element in a surface of constant radius $P$ (a vertical cylinder) is $$\mathrm{d}S_\rho = \rho\,\mathrm{d}\varphi\,\mathrm{d}z.$$

The surface element in a surface of constant azimuth $ρ$ (a vertical half-plane) is $$\mathrm{d}S_\varphi = \mathrm{d}\rho\,\mathrm{d}z.$$

The surface element in a surface of constant height $φ$ (a horizontal plane) is $$\mathrm{d}S_z = \rho\,\mathrm{d}\rho\,\mathrm{d}\varphi.$$

The del operator in this system leads to the following expressions for gradient, divergence, curl and Laplacian: $$\begin{align} \nabla f &= \frac{\partial f}{\partial \rho}\boldsymbol{\hat{\rho}} + \frac{1}{\rho}\frac{\partial f}{\partial \varphi}\boldsymbol{\hat{\varphi}} + \frac{\partial f}{\partial z}\boldsymbol{\hat{z}} \\[8px]

\nabla \cdot \boldsymbol{A} &= \frac{1}{\rho}\frac{\partial}{\partial \rho}\left(\rho A_\rho\right) + \frac{1}{\rho} \frac{\partial A_\varphi}{\partial \varphi} + \frac{\partial A_z}{\partial z} \\[8px]

\nabla \times \boldsymbol{A} &= \left(\frac{1}{\rho}\frac{\partial A_z}{\partial \varphi} - \frac{\partial A_\varphi}{\partial z}\right)\boldsymbol{\hat{\rho}} + \left(\frac{\partial A_\rho}{\partial z} - \frac{\partial A_z}{\partial \rho}\right)\boldsymbol{\hat{\varphi}} + \frac{1}{\rho}\left(\frac{\partial}{\partial \rho}\left(\rho A_\varphi\right) - \frac{\partial A_\rho}{\partial \varphi}\right) \boldsymbol{\hat{z}} \\[8px]

\nabla^2 f &= \frac{1}{\rho} \frac{\partial}{\partial \rho} \left(\rho \frac{\partial f}{\partial \rho}\right) + \frac{1}{\rho^2} \frac{\partial^2 f}{\partial \varphi^2} + \frac{\partial^2 f}{\partial z^2} \end{align}$$

Cylindrical harmonics
The solutions to the Laplace equation in a system with cylindrical symmetry are called cylindrical harmonics.

Kinematics
In a cylindrical coordinate system, the position of a particle can be written as $$\boldsymbol{r} = \rho\,\boldsymbol{\hat \rho} + z\,\boldsymbol{\hat z}.$$ The velocity of the particle is the time derivative of its position, $$\boldsymbol{v} = \frac{\mathrm{d}\boldsymbol{r}}{\mathrm{d}t} = \dot{\rho}\,\boldsymbol{\hat \rho} + \rho\,\dot\varphi\,\hat{\boldsymbol{\varphi}} + \dot{z}\,\hat{\boldsymbol{z}},$$ where the term $$\rho \dot\varphi\hat\varphi$$ comes from the Poisson formula $$\frac{\mathrm d\hat\rho}{\mathrm dt} = \dot\varphi\hat z\times \hat\rho $$. Its acceleration is $$ \boldsymbol{a} = \frac{\mathrm{d}\boldsymbol{v}}{\mathrm{d}t} = \left( \ddot{\rho} - \rho\,\dot\varphi^2 \right)\boldsymbol{\hat \rho} + \left( 2\dot{\rho}\,\dot\varphi + \rho\,\ddot\varphi \right) \hat{\boldsymbol\varphi } + \ddot{z}\,\hat{\boldsymbol{z}} $$