List of common coordinate transformations

From testwiki
Jump to navigation Jump to search

Template:Short description Template:More citations needed Template:Use dmy dates

This is a list of some of the most commonly used coordinate transformations.

2-dimensional

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

To Cartesian coordinates

From polar coordinates

x=rcosθy=rsinθ(x,y)(r,θ)=[cosθrsinθsinθrcosθ]Jacobian=det(x,y)(r,θ)=r

From log-polar coordinates

Template:Main

x=eρcosθ,y=eρsinθ.

By using complex numbers (x,y)=x+iy, the transformation can be written as x+iy=eρ+iθ

That is, it is given by the complex exponential function.

From bipolar coordinates

Template:Main x=asinhτcoshτcosσy=asinσcoshτcosσ

From 2-center bipolar coordinates

Template:Main x=14c(r12r22)y=±14c16c2r12(r12r22+4c2)2

From Cesàro equation

Template:Main x=cos[κ(s)ds]dsy=sin[κ(s)ds]ds

To polar coordinates

From Cartesian coordinates

r=x2+y2θ=arctan|yx| Note: solving for θ returns the resultant angle in the first quadrant (0<θ<π2). To find θ, one must refer to the original Cartesian coordinate, determine the quadrant in which θ lies (for example, (3,−3) [Cartesian] lies in QIV), then use the following to solve for θ:

θ={θfor θ in QI: 0<θ<π2πθfor θ in QII: π2<θ<ππ+θfor θ in QIII: π<θ<3π22πθfor θ in QIV: 3π2<θ<2π

The value for θ must be solved for in this manner because for all values of θ, tanθ is only defined for π2<θ<+π2, and is periodic (with period π). This means that the inverse function will only give values in the domain of the function, but restricted to a single period. Hence, the range of the inverse function is only half a full circle.

Note that one can also use r=x2+y2θ=2arctanyx+r

From 2-center bipolar coordinates

r=r12+r222c22θ=arctan[8c2(r12+r222c2)r12r221]

Where 2c is the distance between the poles.

To log-polar coordinates from Cartesian coordinates

ρ=logx2+y2,θ=arctanyx.

Arc-length and curvature

In Cartesian coordinates

κ=xyyx(x2+y2)32s=atx2+y2dt

In polar coordinates

κ=r2+2r2rr(r2+r2)32s=aφr2+r2dφ

3-dimensional

Let (x, y, z) be the standard Cartesian coordinates, and (ρ, θ, φ) the spherical coordinates, with θ the angle measured away from the +Z axis (as [1], see conventions in spherical coordinates). 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 main axes and are in practice most easily solved by observation.

To Cartesian coordinates

From spherical coordinates

Template:Main x=ρsinθcosφy=ρsinθsinφz=ρcosθ(x,y,z)(ρ,θ,φ)=(sinθcosφρcosθcosφρsinθsinφsinθsinφρcosθsinφρsinθcosφcosθρsinθ0)

So for the volume element: dxdydz=det(x,y,z)(ρ,θ,φ)dρdθdφ=ρ2sinθdρdθdφ

From cylindrical coordinates

Template:Main x=rcosθy=rsinθz=z(x,y,z)(r,θ,z)=(cosθrsinθ0sinθrcosθ0001)

So for the volume element: dV=dxdydz=det(x,y,z)(r,θ,z)drdθdz=rdrdθdz

To spherical coordinates

Template:Main

From Cartesian coordinates

ρ=x2+y2+z2θ=arctan(x2+y2z)=arccos(zx2+y2+z2)φ=arctan(yx)=arccos(xx2+y2)=arcsin(yx2+y2)(ρ,θ,φ)(x,y,z)=(xρyρzρxzρ2x2+y2yzρ2x2+y2x2+y2ρ2yx2+y2xx2+y20)

See also the article on atan2 for how to elegantly handle some edge cases.

So for the element: dρdθdφ=det(ρ,θ,φ)(x,y,z)dxdydz=1x2+y2x2+y2+z2dxdydz

From cylindrical coordinates

Template:Main ρ=r2+h2θ=arctanrhφ=φ(ρ,θ,φ)(r,h,φ)=(rr2+h2hr2+h20hr2+h2rr2+h20001)det(ρ,θ,φ)(r,h,φ)=1r2+h2

To cylindrical coordinates

From Cartesian coordinates

r=x2+y2θ=arctan(yx)z=z

(r,θ,h)(x,y,z)=(xx2+y2yx2+y20yx2+y2xx2+y20001)

From spherical coordinates

r=ρsinφh=ρcosφθ=θ(r,h,θ)(ρ,φ,θ)=(sinφρcosφ0cosφρsinφ0001)det(r,h,θ)(ρ,φ,θ)=ρ

Arc-length, curvature and torsion from Cartesian coordinates

s=0tx2+y2+z2dtκ=(zyyz)2+(xzzx)2+(yxxy)2(x2+y2+z2)32τ=x(yzyz)+y(xzxz)+z(xyxy)(xyxy)2+(xzxz)2+(yzyz)2

See also

References

Template:Reflist