Saturday, November 28, 2020

The Uniform-Distribution-on-the-Sphere's Nemesis: Isothermal Coordinates

Inspired by the last post where the conformal version of the polar grid is $(x,y) = (e^u \cos v, e^u \sin v)$ i.e. the radius is now exponentiated (namely what looks like a grid of squares in the domain gets mapped to what looks like squares in the range: the concentric circles bunch up much more densely close to the origin, to correspond to radial lines converging at the origin), I set out to do it on the sphere as well (that conformal polar grid is simply the image of the complex plane under the complex exponential $e^z$). This is in some sense the polar (hah) opposite of something that would produce a uniform distribution of points on a sphere, because this map would assign each square an equal chance (so of course, the closer you get to the poles, the squares are smaller and more of them encompass the same space in the image, so they'll be much more densely packed).

The quickest way to see this is to note the stereographic projection is a conformal map, and has the formula
\[(x,y) \mapsto \left(\frac{2x}{x^2+y^2+1}, \frac{2y}{x^2+y^2+1}, \frac{x^2+y^2-1}{x^2+y^2+1}\right)\]
and with a substitution of the complex exponential, you get \[(u,v) \mapsto \left(\frac{2e^u \cos v}{e^{2u}+1}, \frac{2e^u \sin v}{e^{2u}+1}, \frac{e^{2u}-1}{e^{2u}+1}\right) = \left(\frac{2}{e^u+e^{-u}}\cos v, \frac{2}{e^u+e^{-u}}\sin v, \frac{e^u-e^{-u}}{e^u+e^{-u}}\right)\]
I rewrote that in that form for fans of hyperbolic functions, which gives the map
\[ (u,v) \mapsto(\operatorname{sech} u \cos v, \operatorname{sech} u \sin v, \tanh u)\] (hyperbolic secant seems to be one of the least used ones; $\LaTeX$ doesn't recognize it!). But the upshot is, this formula looks very similar to the usual geographic coordinate system (just swapping out some transcendental functions).

Another version with finer grid lines. Notice how they cluster at the top.

Another way of looking at this is via manipulation of the metric coefficients directly, which raises some interesting points on the nature of the Laplace equation. If we consider the standard geographic parametrization$(x,y,z) = (\sin\varphi\cos\theta, \sin\varphi\sin\theta, \cos\varphi)$ with Euclidean metric $g = ds^2 = d\varphi^2 + \sin^2 \varphi\; d\theta^2$. To say that the parametrization is conformal (grid squares to grid squares) is to say that there are some parameters $u$ and $v$ and a function $\sigma$ such that $g = \sigma^2(du^2 + dv^2)$ (forcing the matrix to not only be diagonal, but a multiple of the identity). If we set things up so that $du = -\csc\varphi d\varphi$ and $dv = d\theta$, then $\sin^2\varphi (du^2 + dv^2) = d\varphi^2 + \sin^2\varphi\; d\theta^2)$. Consulting trusty integral tables, Wolfram Alpha'ing it, or whatever, we find that this differential equation gives $u = \ln(\csc \varphi + \cot \varphi) + C$. One can make it this derivation a little less "out of the blue" situation in a very interesting derivation of Laplace's equation using certain complex analysis hackery (George Springer's Introduction to Riemann Surfaces, section 1-3). We'll derive this another day, but the summary is, we end up deriving that $u$ has to satisfy the spherical Laplace equation \[\frac{1}{\sin\varphi} \frac{\partial}{\partial \varphi}\left(\sin \varphi \frac{\partial u}{\partial \varphi}\right) + \frac{1}{\sin \varphi} \frac{\partial^2 u}{\partial \theta^2} = 0,\] or really, it only has to satisfy this on an open subset of the sphere, in this case, a sphere with two points deleted. This fact often gets glossed over by people talking about geometry; we know that on a sphere, the only harmonic functions that are actually defined on the sphere everywhere are constant functions—so we can only find "interesting" harmonic functions on a sphere if they blow up at certain points. Using the very reasonable assumption that such a function $u$ should be independent of $\theta$, we derive $\frac{d}{d \varphi} \left(\sin\varphi \frac{d u}{d \varphi}\right) = 0$, making $\sin\varphi \frac{d u}{d \varphi} = C_1$ a constant, and $\frac{du}{d\varphi} = C_1 \csc \varphi$ to finally get $u = C_1 \ln(\csc \varphi + \cot \varphi) + C_2$, as before (just with two degrees of freedom, namely $C_1$ controls what the initial spacing of the grid lines, and $C_2$ controls what the value is at the equator). This function blows up at the poles, a fact which manifests itself visually by the grid curves $u =$ constant become more closely spaced together at the poles (and become infinitely dense there, meaning, this is only a valid coordinate system in the sphere outside the poles). We just set $C_1 = 1$ and $C_2 = 0$, which assigns the equator to $u=0$.

Finally, we have to do some algebra, though, to get to where we want: trying to find the inverse of $u = \ln(\csc \varphi + \cot \varphi)$. This says $e^u = \csc\varphi+\cot\varphi = \frac{1+\cos\varphi}{\sin\varphi}$. This is just $\frac{1+z}{r}$ where $r$ is the cylindrical coordinate $\sqrt{x^2+y^2}$. But if we're on the sphere, $z^2 + r^2 =1$, so this gives us \[e^{2u} = \frac{(1+z)^2}{1-z^2} = \frac{1+z}{1-z}.\] Rearranging we get $e^{2u}-e^{2u}z = 1+z$, or $z(1+e^{2u}) = e^{2u}-1$. This gives \[z=\frac{e^{2u}-1}{e^{2u}+1} = \frac{e^{u}-e^{-u}}{e^{u}+e^{-u}} = \tanh u.\]. To get the $x$ and $y$, we note that $\sin\varphi = r = e^{-u}(1+z) = e^{-u}(1+\tanh u)$. Finally,
\[ 1+ \tanh u = \frac{\cosh u + \sinh u}{\cosh u} = \frac{e^u}{\cosh u}, \] which, multiplying by the $e^{-u}$ gives $\frac{1}{\cosh u}$ or $\operatorname{sech} u$.

The coordinates we derived are called isothermal coordinates, and knowing what a big fan I am of stat mech, I'd like to fully understand the origin of the term someday. Finally, one might ask if there are coordinate systems (conformal or otherwise) that will cover up all the sphere without weird coordinate singularities like that. The answer is no, and the short explanation of why is because a smooth vector field on the sphere must vanish somewhere (the hairy ball theorem), and since coordinates always set up vector fields (take the vector in the direction of a coordinate curve) and aren't supposed to collapse at good points. This is a long topic for another day (we'll show some pretty cool coordinate systems on the sphere, though!)

No comments:

Post a Comment