Terraforming

Unfortunately, the days are over when you could just ask the Magratheans to build you a planet to order. Let’s deal with what we have and deform it a little, continuing my little series of visualizing conformal maps. Here is what we have:

MobiusTrandormation0

The easiest we can do is to shrink and expand the hemispheres, counteracting centuries of imperialism. Mathematically, this is just a multiplication like say f(z)= z/2.

MobiusTrandormation1

Curiously, translations like f(z)=z+1 have a much more dramatic effect, they move the north pole (which corresponds to 0) and keep the south pole (infinity).

MobiusTrandormation1b

If we want to move both poles simultaneously and keep the equator where it is, we need Möbius transformations.

MobiusTrandormation2

This is about as general as it gets with degree 1 maps. Here is a degree 2 map, f(z)=z+1/z:

Quadratic

Both polar caps have been folded into one. From a quadratic map we would expect intersecting parameter lines. This doesn’t happen here because the map I have chosen is rather symmetric. To indicate what usually happens, below is the image of a hemisphere under the innocent map f(z)=(z+1)^2:

Quadratic2

Around (Southern Illinois II)

DSC 3511

In the middle of the Midwest, there is the small College town Carbondale. The nearest airport is in St. Louis, two hours away by car, if you survive the trucks that rush towards Chicago. However, it is not just rolling hills and corn fields. There is Giant City State Park, which is not, as I was afraid, another amusement park.

DSC 3508

Instead, it is one of the best hidden gems of the midwest. The numerous trails take you through lush forests and along sandstone cliffs.

DSC 3411

Some of the boulders have a distinctive organic appearance, and you begin to wonder whether they could come alive… Also, everything seems to tilt in unexpected ways.

DSC 3455

Is it that these wall want to keep us out, or keep something inside?

DSC 3458

To be continued…

Beach Balls

Following Jack’s suggestion, let’s try to visualize holomorphic maps from the Riemann sphere to itself. As a reference, here is the Riemann sphere with polar coordinates, and on the right hand side its cylindrical projection.

Identity

The preimage of this under a quadratic polynomial looks like this:

Square

And here a rational function function of degree 4:

Quartic

One can get quick images using uv-mapping, but there are some rendering artifacts I don’t know how to get rid of yet. Degree 5:

Deg5

Finally, the Gamma function, which has an essential singularity at infinity.

Gamma

Martha says their gypsum printer can print these in color. We’ll see, I hope.

Sacred Grounds Café (Southern Illinois I)

One of my little hobbies is to visit places that play a role in a book (or film) I like. This year, one of my favorite books so far has been John Burnside’s novel Ashland and Vine. Even though the author is Scottish, the book takes place in a generic Midwestern college town called Scarsville.

DSC 1547

The book is about a College student and an elderly Lady. I don’t like to write or read reviews, and in this case the title already is hint enough. It is a good book. We don’t learn much about the place, until a coffee place is mentioned with the uncommon (for a coffee place) name Sacred Grounds Café. Thinking about it, this is an excellent name for a coffee place, because it tells the customer that one is welcome to sit down for a while instead of just grabbing a quick coffee. In any case, I found the name odd. There are indeed real coffee places in the US with that name, and one of them is in Edwardsville, Illinois. Even better, it is also on Main Street, as in the book.

DSC 1539

I decided to pay the place a visit. Unfortunately, the staff didn’t know author or book, and the owner (who plays a role in the book, too), was not present.

The quiche with sweet potatoes and spinach was excellent.

DSC 1537

Spring Cleaning II

This is a continuation of my previous post about this game. Because it is impartial and the rules are simple, one can write a computer program that computes for a given position of dirt pieces the size of the equivalent Nim heap (which is also called its Grundy number or its nimber). Because this is computationally prohibitive, one does this for simple shapes, discovers patterns, and proves these. We did this for rectangles the last time. To warm up, we do it for L-shapes today. Here is. (5,3)-L:

Sweep L53

The nimber of this position is 1, which means in particular that there is a winning move for the first player. You can for instance do vertical swipe in the second column, leaving the second player with two disconnected row/column of three dirt pieces each. From then on, we play symmetrically and win.

For the general (alb)-L, the nimbers are as follows:

a\b 2 3 4 5 6
2 0 4 4 0 3
3 4 1 0 1 0
4 3 0 3 0 3
5 0 1 0 1 0
6 3 0 3 0 3

In other words, the nimber of an L with legs at least 3 dirt pieces long behaves quite simple.
This is good, because if a player can easily memorize the nimbers of simple positions, and these nimbers are small, then the player can usually easily win against players who lack this knowledge.

But maybe all this talk about nimbers is just vain traditional mathematics, and there is an alternative way to understand this game and win easily, without any theory, just by being smart and tough?

Let’s look at at another type of Spring Cleaning positions which I call zigzags. Below are the zigzags Z(1) through Z(7),

Zigzags

and here is the table of the first few nimbers:

n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
nimber 0 0 1 2 0 1 2 3 1 2 3 4 0 3 4

Any pattern emerging? No? There is a solution: Whenever you have a sequence of integers you are clueless about, you had to the Online Encyclopedia of Integer Sequences, the best thing the internet has produced ever, and type it in.

It turns out that the sequence at hand is known as the sequence of nimbers of another impartial game which is called Couples are Forever. The rules are simple: The game is is being played with several piles of tokens. Both players take turns splitting any one pile of size at least three tokens into two piles. The game ends when no piles with more than two tokens are left. This impartial game, beginning with a pile of size n, has (with a shift of two) the same nimbers as the zigzags in Spring Cleaning.

Moreover, for Couples are Forever, the nimbers have been computed into the millions, and no pattern has been found whatsoever. It is not even known whether the nimbers remain bounded.

Couplesgraph

Above is the graph for the nimbers of Couples are Forever (or zigzags in Spring Cleaning) for pile sizes up to 25,000. At first (up to 10,000 or so), it looks like the nimbers are growing linearly, but then they appear to even out. Nobody knows. This is one of the famous open problems in combinatorial game theory.

It tells us also that there won’t be a tough&smart solution for this game, or for Spring Cleaning, or for reality. Which is a good thing.

Forward (Arizona V)

Not only looking down is worthwhile, but also looking ahead.

DSC 1583

So this is my collection of pictures of tree bark from Arizona. The textures are beautiful, and one wonders why the trees are making this effort.

DSC 1782

After all, the visible outer layer is just dead cells.

DSC 1802

So, more precisely: Does the beauty we (or is it just me?) see in these structures provide some evolutionary advantage?

DSC 2205

Not for the trees, I am afraid.

DSC 2207

But maybe for us,

DSC 2209

because the beauty we believe to see helps to keep looking forward, despite all the decay.

Moth bark

More Circle Magic

Today we revisit the three previous posts about playing with circles with Mathematica Code, as promised.

First, we set up a reference image we want to play with:

width = 3;
height = 2;
spacing = .2;
vectorrectangle = Graphics[{Thickness[.01],
   Join[
    Table[
     Line[{{i, 0}, {i, height}}, VertexColors -> {Red, Green}], {i, 0,
       width, spacing}],
    Table[
     Line[{{0, j}, {width, j}}, VertexColors -> {Blue, Yellow}], {j, 
      0, height, spacing}]
    ]
   }
  ]

Rect1

and convert this vector graphics into a bit image:

a = 500 width;
b = 500 height;
bitimage = Image[vectorrectangle, ImageSize -> {a, b}];
rectangleimage = ImageData[bitimage];

Instead of this, you can paste any bitmap into the Image[] function and adjust a and b to the correct dimensions.
ImageData converts the bitmap into an array of RGB values.

Now we do some complex analysis magic, using elliptic functions, in order to map the unit disk to the rectangle.

tau = b/a I;
modul = 1./(ModularLambda[2 tau])^(1/4);
ellipticwidth = (2*EllipticK[1/modul^4])/modul;

DiskToUpperHalfPlane[z_] := (1 - I z)/(-I + z);
UpperHalfPlaneToRectangle[z_] := 
  EllipticF[ArcSin[modul z], 1/modul^4]/modul;
UpperHalfPlaneToNormalizedRectangle[z_] := 
  1/2 + UpperHalfPlaneToRectangle[z]/ellipticwidth;
imre[z_] := {Im[z], Re[z]};

DiskToNormalizedRectangle[z_]

To compute the circular preimage of the rectangle, we create a 750×750 square and map each pixel of the disk within that square to the rectangle, using DiskToNormalizedRectangle, and some rescaling. We record in the square the coordinates of the image pixels, and mark all other pixels in the square that lie not inside the disk as {0,0}.

nn = 750;
scale[{i_, j_}] := 2 (i + I j)/nn - (1 + I);

tab = Transpose[Table[
    If[Abs[scale[{i, j}]] > .99,
     {0, 0},
     imre[a (DiskToNormalizedRectangle[scale[{i, j}]])]], 
	{i, 1, nn}, {j, 1, nn}]];

As the image coordinates are not integers, we interpolate the color of a pixel in the disk as the weighted average of the four adjacent pixels.

WeightedExtract[t_, {x_, y_}] := (1 - FractionalPart[x]) (1 - FractionalPart[y]) t[[Floor[x], Floor[y]]] +
  (1 - FractionalPart[x]) (FractionalPart[y]) t[[Floor[x],  Ceiling[y]]] +
  (FractionalPart[x]) (1 - FractionalPart[y]) t[[Ceiling[x], Floor[y]]] +
  (FractionalPart[x]) (FractionalPart[y]) t[[Ceiling[x], Ceiling[y]]];

colorpick[i_] := 
 If[i == {0, 0}, RGBColor[1, 1, 1], 
  RGBColor @@ WeightedExtract[rectangleimage, i]];

Image[Map[colorpick, tab, {2}]]

Rect2

To use Black products to create multiple copies of this image within the disk, we first generate a list of the zeroes of the Blasche factor, and then multiply the Black factors. Precomposing the Blaschke function with DiskToNormalizedRectangle makes things pretty.

ww = Table[(1 - 1/n^1.4) E^(.4 I n), {n, 2, 20}];
Blaschke[z_] := Product[
  Abs[ww[[n]]]/ww[[n]] (ww[[n]] - z)/(1 - Conjugate[ww[[n]]] z), {n, 
   1, Length[ww]}];

tab = Transpose[Table[
    If[Abs[scale[{i, j}]] > .99,
     {0, 0},
     imre[a (DiskToNormalizedRectangle[scale[Blaschke[{i, j}]]])]], 
	{i, 1, nn}, {j, 1, nn}]];

Image[Map[colorpick, tab, {2}]]

Rect3

To get this back into a rectangle, we need the inverse of the DiskToNormalizedRectangle function. This is done with Jacobi’s elliptical functions:

UpperHalfPlaneToDisk[w_] := (I (-I + w))/(I + w);
RectangleToUpperHalfPlane[w_] := JacobiSN[modul w, 1/modul^4]/modul;
NormalizedRectangleToUpperHalfPlane[w_] := -RectangleToUpperHalfPlane[-ellipticwidth (w - 1/2)];

RectangleSelfMap[z_] := UpperHalfPlaneToNormalizedRectangle[
	DiskToUpperHalfPlane[
   		Blaschke[ 
    		UpperHalfPlaneToDisk[
				NormalizedRectangleToUpperHalfPlane[z]
			]
		]
	]
]

Again, after some bookkeeping

aa = a/2;
bb = b/2;
eps = 0.000001;

scale2[{i_, j_}] := (i + I j)/aa
smash[x_, u_] := If[x  u, u, x]];
smash[{i_, j_}] := {smash[i, b], smash[j, a]};
colorpick2[i_] := colorpick[smash[i]];

tab = Transpose[Table[
    imre[a RectangleSelfMap[(1 - eps) scale2[{i, j}] + eps/2 b/a I ]], {i, 1, aa}, {j, 1, bb}]];
Image[Map[colorpick2, tab, {2}]]

we get our rectangular image back.

Rect4

Keemun

DSC 9850

This year’s first flush Darjeeling is a bit of a disappointment, so I have been revisiting other teas. One of my favorite Chinese black teas are the Keemun teas. They come with a hint of smoke and honey and are ideal afternoon teas. One commonly finds the Mao Feng and the more expensive Hao Ya teas. The leaves are short(cut) and coal black.

DSC 9865

In recent years, there have been interesting experiments. For instance, there is now a Keemun Snail tea with beautiful wiry leaves made from the first buds, with some golden tips. The taste is more subtle than that of a regular Keemun. I got my 2 ounce tin from Harney.

DSC 9844

Even mellower but also more complex is the Keemun Golden Tip Mao Feng which I found at Imperial Teas. It does not look like a Keemun anymore. In addition to the keemunesque smokiness, there are hints of chocolate. Very addictive.

DSC 9822

After brewing, the leaves of the two teas are almost indistinguishable. I wonder what the two signs mean.

DSC 9868 Edit

Playing with Infinity

After Squaring the Circle and using Blaschke products to squeeze finitely many disks conformally into a single disk, the restless mathematician wants to put even more disks into a disk. Infinitely many, that is. What we need for this is a conformal map that maps the disk infinitely often onto itself. We will cheat a little and employ the exponential function. It maps the left half-plane to the punctured unit disk, and because it is 2π periodic. Each point except the center of the unit disk has infinitely many preimages.

Expo 1

So, my first examples map the disk via a Möbius transformation to the left half plane (that is a bijection), and then via the exponential map back to the (punctured) disk. Missing one point won’t be a big deal – what is a single pixel? Pulling back the default spider web on the left replicates it infinitely often, but in a somewhat disappointing way: The circles of the original web become horocycles that are mapped periodically onto the circles. We just have an infinite hyperbolic wall paper, periodic with respect to a parabolic isometry. We can do slightly better by taking products of several such maps.

Below are products of three such Möbius-exponential maps,

Expo 3

and here the two images that use four factors. I have placed the parabolic fixed points symmetrically but played with the Möbius transformations a little.

Of course one can also use infinite Black products, as long as the zeroes of the factors converge rapidly enough to the boundary circle, and as long one is patient enough to evaluate the infinite products to sufficient accuracy.

Binfinity

In the left example, the zeroes follow a spiral, while in the second example, the zeroes alternate between two spirals that turn the opposite way. The zeroes correspond to the circular holes.