List of canonical coordinate transformations

From Wikipedia, the free encyclopedia

This is a list of canonical coordinate transformations.

Contents

[edit] 2-Dimensional

Let (x, y) be the standard Cartesian coordinates, and r and θ the standard polar coordinates.

[edit] To Cartesian coordinates from polar coordinates

x=r\,\cos\theta \quad
y=r\,\sin\theta \quad

[edit] To polar coordinates from Cartesian coordinates

r=\sqrt{x^2 + y^2}
\theta = \arctan\frac{y}{x}

Note: the result is an angle over 2π or 360° (0° to 360°, −180° to +180°, etc.) As the main value of the arctangent is defined only to be from −90° to +90°, one should add or subtract 180° when x<0. In addition when x=0 the division is undefined; yet the angle exists and is ±90° depending on the sign of y. Alternatively one could take the arccotangent of x/y in this case. Another special case to be aware of is the case when both x and y are zero.

Anyhow these special exceptions, although easily allowed for when calculated by hand, make the writing of a general computer program quite a task. Luckily most computer languages provide in addition to the normal arctangent, also an arctangent with 2 arguments with exactly the wanted behaviour. On electronic pocket calculators that function is usually called R->P (rectangular to polar).

[edit] To Cartesian coordinates from bipolar coordinates

x = a \ \frac{\sinh \tau}{\cosh \tau - \cos \sigma}
y = a \ \frac{\sin \sigma}{\cosh \tau - \cos \sigma}

[edit] To Cartesian coordinates from two-center bipolar coordinates[1]

x = \frac{r_1^2-r_2^2}{4c}
y = \pm \frac{1}{4c}\sqrt{16c^2r_1^2-(r_1^2-r_2^2+4c^2)}

[edit] To polar coordinates from two-center bipolar coordinates

r = \sqrt{\frac{r_1^2+r_2^2-2c^2}{2}}
\theta = \arctan \left[ \sqrt{\frac{8c^2(r_1^2+r_2^2-2c^2)}{r_1^2-r_2^2}-1}\right]

Where 2c is the distance between the poles.

[edit] To Cartesian coordinates from intrinsic coordinates

x = \int \cos \left[\int \kappa(s) \,ds\right] ds
y = \int \sin \left[\int \kappa(s) \,ds\right] ds

[edit] 3-Dimensional

Let (x, y, z) be the standard Cartesian coordinates, and (r, θ, φ) the spherical coordinates, with φ the angle measured away from the +Z axis. As θ has a range of 360° the same considerations as in polar (2 dimensional) coordinates apply whenever an arctangent of it is taken. φ has a range of 180°, running from 0° to 180°, and does not pose any problem when calculated from an arccosine, but beware for an arctangent. If, in the alternative definition, φ is chosen to run from −90° to +90°, in opposite direction of the earlier definition, it can be found uniquely from an arcsine, but beware of an arccotangent. In this case in all formulas below all arguments in φ should have sine and cosine exchanged, and as derivative also a plus and minus exchanged.

All divisions by zero result in special cases of being directions along one of the mainaxes and are in practice most easily solved by observation.

[edit] To Cartesian coordinates

[edit] From spherical coordinates

{x}=\rho \, \sin\phi \, \cos\theta \quad
{y}=\rho \, \sin\phi \, \sin\theta \quad
{z}=\rho \, \cos\phi \quad
\frac{\partial(x, y, z)}{\partial(\rho, \theta, \phi)} = \begin{pmatrix} \sin\phi\cos\theta & -\rho\sin\phi\sin\theta & \rho\cos\phi\cos\theta  \\ \sin\phi\sin\theta & \rho\sin\phi\cos\theta  & \rho\cos\phi\sin\theta   \\ \cos\phi           & 0                       & -\rho\sin\phi \end{pmatrix}
\det{\frac{\partial(x, y, z)}{\partial(\rho, \theta, \phi)}} = \rho^2 \sin\phi \; d\rho \; d\theta \; d\phi \;

[edit] From cylindrical coordinates

{x}={r} \,\cos\theta
{y}={r} \, \sin\theta
{z}={h} \,
\frac{\partial(x, y, z)}{\partial(r, \theta, h)} = \begin{pmatrix} \cos\theta & -r\sin\theta & 0 \\ \sin\theta &  r\cos\theta & 0 \\          0 &            0 & 1 \end{pmatrix}
\det{\frac{\partial(x, y, z)}{\partial(r, \theta, h)}} = {r}\; dr \; d\theta \; dh \;

[edit] To Spherical coordinates

[edit] From Cartesian coordinates

{\rho} = \sqrt{x^2+y^2+z^2}
{\theta} = \arccos \frac{x}{\sqrt{x^2+y^2}} = \arcsin \frac{y}{\sqrt{x^2+y^2}} = \arctan\frac{y}{x}
{\phi} = \arccos\frac{z}{\sqrt{x^2+y^2+z^2}} = \arctan\frac{\sqrt{x^2+y^2}}{z}
\frac{\partial(\rho, \theta, \phi)}{\partial(x, y, z)} = \begin{pmatrix}                  \frac{x}{\rho} &                  \frac{y}{\rho} & \frac{z}{\rho} \\              \frac{-y}{x^2+y^2} &               \frac{x}{x^2+y^2} & 0 \\ \frac{xz}{\rho^2\sqrt{x^2+y^2}} & \frac{yz}{\rho^2\sqrt{x^2+y^2}} & \frac{-(x^2+y^2)}{\rho^2\sqrt{x^2+y^2}} \end{pmatrix}

[edit] From cylindrical coordinates

{\rho}=\sqrt{r^2+h^2}
{\theta}=\theta \quad
{\phi}=\arctan\frac{r}{h}
\frac{\partial(\rho, \theta, \phi)}{\partial(r, \theta, h)} = \begin{pmatrix} \frac{r}{\sqrt{r^2+h^2}} & 0 & \frac{h}{\sqrt{r^2+h^2}} \\ 0 & 1 & 0 \\ \frac{-h}{r^2+h^2} & 0 & \frac{r}{r^2+h^2}  \end{pmatrix}
\det \frac{\partial(\rho, \theta, \phi)}{\partial(r, \theta, h)} = \frac{1}{\sqrt{r^2+h^2}}

[edit] To cylindrical coordinates

[edit] From Cartesian coordinates

r=\sqrt{x^2 + y^2}
\theta=\arctan\frac{y}{x} + \pi u_0(-x) \, \operatorname{sgn} y
h=z \quad
\frac{\partial(r, \theta, h)}{\partial(x, y, z)} = \begin{pmatrix} \frac{x}{\sqrt{x^2+y^2}}&\frac{y}{\sqrt{x^2+y^2}}&0\\ \frac{-y}{x^2+y^2}&\frac{x}{x^2+y^2}&0\\ 0&0&1 \end{pmatrix}

[edit] From spherical coordinates

r = \rho \sin \phi \,
\theta  = \theta \,
h  = \rho \cos \phi \,
\frac{\partial(r, \theta, h)}{\partial(\rho, \theta, \phi)} = \begin{pmatrix} \sin\phi & 0 & \rho\cos\phi  \\ 0        & 1 &   0           \\ \cos\phi & 0 & -\rho\sin\phi \end{pmatrix}
\det\frac{\partial(r, \theta, h)}{\partial(\rho, \theta, \phi)} = - \rho

[edit] References

  1. ^ http://bbs.sachina.pku.edu.cn/Stat/Math_World/math/b/b233.htm