List of canonical coordinate transformations
From Wikipedia, the free encyclopedia
This is a list of canonical coordinate transformations.
[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
[edit] To polar coordinates from Cartesian coordinates
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
[edit] To Cartesian coordinates from two-center bipolar coordinates[1]
[edit] To polar coordinates from two-center bipolar coordinates
Where 2c is the distance between the poles.
[edit] To Cartesian coordinates from intrinsic coordinates
[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.