Topic

The Riemann sphere and conformal maps

Stereographic projection wraps the plane round a sphere with the point at infinity at the top, and it is a rational map: a complex rational goes to a point of the sphere with rational coordinates. The standard conformal maps between the disc and the half-plane are Möbius maps, so they are exact too.

toSphere("3/4");                        // [24/25, 0, −7/25]
fromSphere([0, 0, 1]);                  // infinity
cayley();                               // z ↦ (z − i)/(z + i): upper half-plane onto the disc
discAutomorphism("1/2", "3/5 + 4/5i");  // a self-map of the disc sending 1/2 to 0
joukowski(2);                           // 5/4
gridImage(cayley(), { re: [-1, 1], im: [0, 2], step: "1/2" });   // exact circles, for a picture

Stereographic projection

Put the unit sphere with its equator on the unit circle and project from the north pole. The point z = x + iy goes to

(2x∣z∣2+1, 2y∣z∣2+1, ∣z∣2−1∣z∣2+1), \Bigl(\frac{2x}{|z|^2 + 1},\ \frac{2y}{|z|^2 + 1},\ \frac{|z|^2 - 1}{|z|^2 + 1}\Bigr),

a point with rational coordinates whenever z is a complex rational, and ∞ goes to the pole. The inverse is (X+iY)/(1−Z)(X + iY)/(1 - Z). Circles on the sphere become circles or lines in the plane (lines are the circles through the pole), which is why Möbius maps send generalized circles to generalized circles. The chordal distance, the straight-line distance between the two points of the sphere, is exact too: squared, it is 4∣z−w∣2/((1+∣z∣2)(1+∣w∣2))4|z - w|^2/((1 + |z|^2)(1 + |w|^2)).

Rotations of the sphere

A Möbius map with matrix proportional to a unitary one, (ab−bˉaˉ)\begin{pmatrix} a & b \\ -\bar b & \bar a\end{pmatrix}, turns the Riemann sphere rigidly. isSphereRotation tests this exactly, and such a map keeps every chordal distance. The group of these maps is SU(2) modulo ±1, the rotation group of space, which is the same fact as the quaternion rotations seen from another side.

Conformal maps of standard regions

  • cayley(): z↦z−iz+iz \mapsto \tfrac{z - i}{z + i} maps the upper half-plane onto the unit disc and the real line onto the unit circle.
  • halfPlaneToDisc(z0): z↦z−z0z−zˉ0z \mapsto \tfrac{z - z_0}{z - \bar z_0} does the same and sends a chosen point to 0.
  • discAutomorphism(a, u): z↦u z−a1−aˉzz \mapsto u\,\tfrac{z - a}{1 - \bar a z} with |a| < 1 and |u| = 1. Every conformal map of the disc onto itself has this form, and with a rational unit u, such as (3 + 4i)/5, it is exact.
  • joukowski(z): 12(z+1/z)\tfrac12(z + 1/z) maps the outside of the unit disc onto the plane cut along [−1, 1], sending the circle |z| = r to an ellipse with semi-axes 12(r±1/r)\tfrac12(r \pm 1/r). It is not a Möbius map, but it is still rational.

Maps that need exp or log, such as a strip onto a half-plane, use the certified functions with their branches reported (see Branches). regions tests exactly whether a point is in the disc, the upper or right half-plane, or the first quadrant.

Hooks for pictures

Pictures are drawn by the graphics package, and this package supplies the data. gridImage(T) sends each line of a grid to its exact image circle under a Möbius map. sampleGrid(f) evaluates a Möbius map, or any function of two doubles, on a grid for domain colouring, and says kind: "estimated".

callreturns
toSphere(z), fromSphere([X, Y, Z]), chordal2(z, w)Exact rationals; a Complex or infinity
cayley(), halfPlaneToDisc(z0), discAutomorphism(a, u)Mobius maps
joukowski(z), regionsA Complex; exact membership tests
gridImage(T, { re, im, step }), sampleGrid(f, { re, im, width, height }){ kind: "exact", lines }; { kind: "estimated", values }
Try itEdit the code and run it with @ratmath/complex and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs