Controlled Chaos

The chaos game is a simple mathematical technique for creating fractals. Suppose a point jumps over and over again 1/2 of the distance towards a randomly chosen vertex of a triangle. This shape appears, the so-called Sierpiński triangle:

Sierpiński triangle created by the chaos game


But the jumps don’t have to be random: you can use an array to find every possible combination of jumps and so create a more even image. I call this controlled chaos. However, if you try the chaos game (controlled or otherwise) with a square, no fractal appears unless you restrict the vertex chosen in some way. For example, if the point can’t jump towards the same vertex twice or more in a row, this fractal appears:

Ban on jumping towards previously chosen vertex, i.e. v + 0


And if the point can’t jump towards the vertex one place clockwise of the previously chosen vertex, this fractal appears:

Ban on v + 1


If the point can’t jump towards the vertex two places clockwise of the previously chosen vertex, this fractal appears:

Ban on v + 2


If the point can’t jump towards the vertex three places clockwise, or one place anticlockwise, of the previously chosen vertex, this fractal appears (compare v + 1 above):

Ban on v + 3


You can also ban vertices based on how close the point is to them at any given moment. Suppose that the point can’t jump towards the nearest vertex, which means that it must choose to jump towards either the 2nd-nearest, 3rd-nearest or 4th-nearest vertex. A fractal we’ve already seen appears:

Must jump towards vertex at distance 2, 3 or 4


In effect, not jumping towards the nearest vertex means not jumping towards a vertex twice or more in a row. Another familiar fractal appears if the point can’t jump towards the most distant vertex:

d = 1,2,3


But new fractals also appear when the jumps are determined by distance:

d = 1,2,4


d = 1,3,4


And you can add more targets for the jumping point midway between the vertices of the square:

d = 1,2,8


d = 1,4,6


d = 1,6,8


d = 1,7,8


d = 2,3,6


d = 2,3,8


d = 2,4,8


d = 2,5,6


And what if you choose the next vertex by incrementing the previously chosen vertex? Suppose the initial vertex is 1 and the possible increments are 1, 2 and 2. This new fractal appears:

increment = 1,2,2 (for example, 1 + 1 = 2, 2 + 2 = 4, 4 + 2 = 6, and 6 is adjusted thus: 6 – 4 = 2)


And with this set of increments, it’s déjà vu all over again:

i = 2,2,3


And again:

i = 2,3,2


With more possible increments, familiar fractals appear in unfamiliar ways:

i = 1,3,2,3


i = 1,3,3,2


i = 1,4,3,3


i = 2,1,2,2


i = 2,1,3,4


i = 2,2,3,4


i = 3,1,1,2


Now try increments with midpoints on the sides:

v = 4 + midpoints, i = 1,2,4


As we saw above, this incremental fractal can also be created from a square with four vertices and no midpoints:

i = 1,3,3; initial vertex = 1


But the fractal changes when the initial vertex is set to 2, i.e. to one of the midpoints:

i = 1,3,3; initial vertex = 2


And here are more inc-fractals with midpoints:

i = 1,4,2 (cf. inc-fractal 1,2,4 above)


i = 1,4,8


i = 2,6,3


i = 3,2,6

<hr

i = 4,7,8


i = 1,2,3,5


i = 1,4,5,4


i = 6,2,4,1


i = 7,6,2,2


i = 7,8,2,4


i = 7,8,4,2


Root Rite

A square contains one of the great — perhaps the greatest — intellectual rites of passage. If each side of the square is 1 unit in length, how long are its diagonals? By Pythagoras’ theorem:

a^2 + b^2 = c^2
1^2 + 1^2 = 2, so c = √2

So each diagonal is √2 units long. But what is √2? It’s a new kind of number: an irrational number. That doesn’t mean that it’s illogical or against reason, but that it isn’t exactly equal to any ratio of integers like 3/2 or 17/12. When represented as decimals, the digits of all integer ratios either end or fall, sooner or later, into an endlessly repeating pattern:

3/2 = 1.5

17/12 = 1.416,666,666,666,666…

577/408 = 1.414,2156 8627 4509 8039,2156 8627 4509 8039,2156 8627 4509 8039,2156 8627 4509 8039,2156 8627 4509 8039,…

But when √2 is represented as a decimal, its digits go on for ever without any such pattern:

√2 = 1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,462,107…

The intellectual rite of passage comes when you understand why √2 is irrational and behaves like that:

Proof of the irrationality of √2

1. Suppose that there is some ratio, a/b, such that

2. a and b have no factors in common and

3. a^2/b^2 = 2.

4. It follows that a^2 = 2b^2.

5. Therefore a is even and there is some number, c, such that 2c = a.

6. Substituting c in #4, we derive (2c)^2 = 4c^2 = 2b^2.

7. Therefore 2c^2 = b^2 and b is also even.

8. But #7 contradicts #2 and the supposition that a and b have no factors in common.

9. Therefore, by reductio ad absurdum, there is no ratio, a/b, such that a^2/b^2 = 2. Q.E.D.

Given that subtle proof, you might think the digits of an irrational number like √2 would be difficult to calculate. In fact, they’re easy. And one method is so easy that it’s often re-discovered by recreational mathematicians. Suppose that a is an estimate for √2 but it’s too high. Clearly, if 2/a = b, then b will be too low. To get a better estimate, you simply split the difference: a = (a + b) / 2. Then do it again and again:

a = (2/a + a) / 2

If you first set a = 1, the estimates improve like this:

(2/1 + 1) / 2 = 3/2
2 – (3/2)^2 = -0.25
(2/(3/2) + 3/2) / 2 = 17/12
2 – (17/12)^2 = -0.00694…
(2/(17/12) + 17/12) / 2 = 577/408
2 – (577/408)^2 = -0.000006007…
(2/(577/408) + 577/408) / 2 = 665857/470832
2 – (665857/470832)^2 = -0.00000000000451…

In fact, the estimate doubles in accuracy (or better) at each stage (the first digit to differ is underlined):

1.5… = 3/2 (matching digits = 1)
1.4… = √2

1.416… = 17/12 (m=3)
1.414… = √2

1.414,215… = 577/408 (m=6)
1.414,213… = √2

1.414,213,562,374… = 665857/470832 (m=12)
1.414,213,562,373… = √2

1.414,213,562,373,095,048,801,689… = 886731088897/627013566048 (m=24)
1.414,213,562,373,095,048,801,688… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,377… (m=48)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,6… (m=97)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,5… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,8… (m=196)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,5… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,571,470,109,559,971,605,970,274,534,59
6,862,014,728,517,418,640,889,198,609,552,329,230,484,308,714,321,450,839,762,603,627,995,251,407,98
9,687,253,396,546,331,808,829,640,620,615,258,352,395,054,745,750,287,759,961,729,835,575,220,337,53
1,857,011,354,374,603,43… (m=392)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,571,470,109,559,971,605,970,274,534,59
6,862,014,728,517,418,640,889,198,609,552,329,230,484,308,714,321,450,839,762,603,627,995,251,407,98
9,687,253,396,546,331,808,829,640,620,615,258,352,395,054,745,750,287,759,961,729,835,575,220,337,53
1,857,011,354,374,603,40… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,571,470,109,559,971,605,970,274,534,59
6,862,014,728,517,418,640,889,198,609,552,329,230,484,308,714,321,450,839,762,603,627,995,251,407,98
9,687,253,396,546,331,808,829,640,620,615,258,352,395,054,745,750,287,759,961,729,835,575,220,337,53
1,857,011,354,374,603,408,498,847,160,386,899,970,699,004,815,030,544,027,790,316,454,247,823,068,49
2,936,918,621,580,578,463,111,596,668,713,013,015,618,568,987,237,235,288,509,264,861,249,497,715,42
1,833,420,428,568,606,014,682,472,077,143,585,487,415,565,706,967,765,372,022,648,544,701,585,880,16
2,075,847,492,265,722,600,208,558,446,652,145,839,889,394,437,092,659,180,031,138,824,646,815,708,26
3,010,059,485,870,400,318,648,034,219,489,727,829,064,104,507,263,688,131,373,985,525,611,732,204,02
4,509,122,770,022,694,112,757,362,728,049,574… (m=783)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,571,470,109,559,971,605,970,274,534,59
6,862,014,728,517,418,640,889,198,609,552,329,230,484,308,714,321,450,839,762,603,627,995,251,407,98
9,687,253,396,546,331,808,829,640,620,615,258,352,395,054,745,750,287,759,961,729,835,575,220,337,53
1,857,011,354,374,603,408,498,847,160,386,899,970,699,004,815,030,544,027,790,316,454,247,823,068,49
2,936,918,621,580,578,463,111,596,668,713,013,015,618,568,987,237,235,288,509,264,861,249,497,715,42
1,833,420,428,568,606,014,682,472,077,143,585,487,415,565,706,967,765,372,022,648,544,701,585,880,16
2,075,847,492,265,722,600,208,558,446,652,145,839,889,394,437,092,659,180,031,138,824,646,815,708,26
3,010,059,485,870,400,318,648,034,219,489,727,829,064,104,507,263,688,131,373,985,525,611,732,204,02
4,509,122,770,022,694,112,757,362,728,049,573… = √2

Allus Pour, Horic

*As a rotating animated gif (optimized at ezGIF).


Performativizing Paronomasticity

The title of this incendiary intervention, which is perhaps my most contrived title yet, is a paronomasia on Shakespeare’s “Alas, poor Yorick!” (Hamlet, Act 5, scene 1). “Allus” is a northern form of “always”, “pour” has its standard meaning, and “Horic” is from the Greek ὡρῐκός, hōrikos, which strictly speaking means “in one’s prime, blooming”. However, it could also be interpreted as meaning “hourly”. So the paronomasia means “Always pour, O Hourly One!” (i.e. hourglass).

Squooh You

Here’s an interesting little puzzle:

Winnie-the-Pooh and Piglet set out to visit one another. They leave their houses at the same time and walk along the same road. But Piglet is absorbed in counting the birds overhead, and Winnie-the-Pooh is composing a new “hum,” so they pass one another without noticing. One minute after the meeting, Winnie-the-Pooh is at Piglet’s house, and 4 minutes after the meeting Piglet is at Winnie-the-Pooh’s. How long has each of them walked? — “A puzzle by S. Sefibekov” viâ Futility Closet

If you’re good at maths, you should see the answer in an intuitive instant. I’m not good at maths, so it took me much longer, because I didn’t understand what was going on. But I can explain the answer like this. Pooh is obviously walking faster than Piglet. Therefore, Pooh and Piglet can’t have met after one minute, because that would mean Pooh takes one minute to walk the distance walked by Piglet in one minute.

So let’s suppose Pooh and Piglet met after two minutes. If Pooh takes one minute to walk the distance walked by Piglet in two minutes, then Pooh is walking twice as fast as Piglet. Does that work? Yes, because Piglet walks Pooh’s distance in four minutes, which is twice as long as Pooh took. Therefore Piglet is walking twice as slowly as Pooh. It’s symmetrical and we can conclude that they did indeed meet after two minutes. Pooh then walks another minute, for three minutes in total, and Piglet walks another four minutes, for six minutes in total.

But guessing is not a good way to find the answer to the puzzle. Let’s try to reason it through properly. Suppose that Pooh and Piglet meet after one unit of time, during which Piglet has walked one unit of distance and Pooh has walked x units of distance, where x > 1. In other words, Pooh is walking x times faster than Piglet. The distances they walk before meeting are therefore in the ratio:

1 : x

Next, note that Pooh will cover the distance Piglet has already walked in 1 unit / x = 1 minute, while Piglet covers the distance Pooh has already walked in x / 1 = 4 minutes. The times they take are therefore in the ratio:

1 / x : x → 1 : x^2 → 1 : 4

And if 1 : x^2 is 1 : 4 (the ratio of the minutes they walk after meeting), then 1 : x (the ratio of the distances they walk before meeting) = 1 : √(x^2) = 1 : √4 = 1 : 2. Pooh is therefore walking 2x faster than Piglet and Piglet is walking 2x slower than Pooh. If Pooh covers Piglet’s distance in 1 minute, Piglet must have taken 2 minutes to walk that distance. And if Piglet covers Pooh’s distance in 4 minutes, Pooh must have taken 2 minutes to walk that distance.

Therefore, when they meet, each of them has been walking for 2 minutes. Pooh therefore walks 2 + 1 = 3 minutes in total and Piglet walks 2 + 4 = 6 minutes in total.

The result can be generalized for all relative speeds. Suppose that Pooh and Piglet meet after m1 minutes and that Pooh then takes m2 minutes to walk the distance Piglet walked in m1 minutes, while Piglet takes m3 minutes to walk the distance Pooh walked in m1 minutes. The time they walk before they meet, m1 minutes, is therefore supplied by this simple equation:

m1 = √(m3 / m2)

And you can call √(m3 / m2), the square root of m3 / m2, the squooh function:

m1 = √(m3 / m2) = squooh(m2,m3)

Now suppose the distance between Pooh’s and Piglet’s houses houses is 12 units of distance and that Piglet always walks at 1 unit a minute. If Pooh walks at the same speed as Piglet, i.e. 1 unit a minute, then:

After they meet, Pooh walks 6 more min = m2, Piglet walks 6 more min = m3.

How long do they walk before they meet?

m1 = m3 / m2 = 1, √1 * 6 = 6

They meet after 6 min.

Now suppose that after they meet, Pooh walks 2 more min, Piglet walks 8 more min.

Therefore, m3 / m2 = 4, √4 * 2 = 2 * 2 = 4 = m1

Therefore they walk for 4 min before they meet and Pooh walks 2x faster than Piglet.

After they meet, Pooh walks 1 more min, Piglet walks 9 more min (m3 / m2 = 9, √9 * 1 = 3)

Therefore they walk for 3 min before they meet and Pooh walks 3x faster than Piglet.

After they meet, Pooh walks 0·6 more min, Piglet walks 9·6 more min (m3 / m2 = 16, √16 * 0·6 = 4 * 0·6 = 2·4)

Therefore they walk for 2·4 min before they meet and Pooh walks 4x faster than Piglet:

After they meet, Pooh walks 0·4 more min, Piglet walks 10 more min (m3 / m2 = 25, √25 * 0·4 = 5 * 0·4 = 2)

Therefore they walk for 2 min before they meet and Pooh walks 5x faster than Piglet.

And so on.

A Seed Indeed

Like plants, fractals grow from seeds. But plants start with a small seed that gets bigger. Fractals start with a big seed that gets smaller. For example, perhaps the most famous fractal of all is the Koch snowflake. The seed of the Koch snowflake is step #2 here:

Stages of the Koch snowflake (from Fractals and the coast of Great Britain)


To create the Koch snowflake, you replace each straight line in the initial triangle with the seed:

Creating the Koch snowflake (from Wikipedia)


Animated Koch snowflake (from Wikipedia)


Now here’s another seed for another fractal:

Fractal stage #1


The seed is like a capital “I”, consisting of a line of length l sitting between two lines of length l/2 at right angles. The rule this time is: Replace the center of the longer line and the two shorter lines with ½-sized versions of the seed:

Fractal stage #2


Try and guess what the final fractal looks like when this rule is applied again and again:

Fractal stage #3


Fractal stage #4


Fractal stage #5


Fractal stage #6


Fractal stage #7


Fractal stage #8


Fractal stage #9


Fractal stage #10


I call this fractal the hourglass. And there are a lot of ways to create it. Here’s an animated version of the way shown in this post:

Hourglass fractal (animated)


Hour Re-Re-Powered

In “Hour Power” I looked at my favorite fractal, the hourglass fractal:

The hourglass fractal


I showed three ways to create the fractal. Next, in “Hour Re-Powered”, I showed a fourth way. Now here’s a fifth (previously shown in “Tri Again”).

This is a rep-4 isosceles right triangle:

Rep-4 isosceles right triangle


If you divide and discard one of the four sub-triangles, then adjust one of the three remaining sub-triangles, then keep on dividing-and-discarding (and adjusting), you can create a certain fractal — the hourglass fractal:

Triangle to hourglass #1


Triangle to hourglass #2


Triangle to hourglass #3


Triangle to hourglass #4


Triangle to hourglass #5


Triangle to hourglass #6


Triangle to hourglass #7


Triangle to hourglass #8


Triangle to hourglass #9


Triangle to hourglass #10


Triangle to hourglass (anim) (open in new tab to see full-sized version)


And here is a zoomed version:

Triangle to hourglass (large)


Triangle to hourglass (large) (anim)


Hour Re-Powered

Pre-previously on Overlord in terms of the Über-Feral, I looked at my favorite member of the fractal community, the Hourglass Fractal:

The hourglass fractal


A real hourglass for comparison


As I described how I discovered the hourglass fractal indirectly and by accident, then showed how to create it directly, using two isosceles triangles set apex-to-apex in the form of an hourglass:

Triangles to hourglass #1


Triangles to hourglass #2


Triangles to hourglass #3


Triangles to hourglass #4


Triangles to hourglass #5


Triangles to hourglass #6

[…]

Triangles to hourglass #10


Triangles to hourglass #11


Triangles to hourglass #12


Triangles to hourglass (animated)


Now, here’s an even simpler way to create the hourglass fractal, starting with a single vertical line:

Line to hourglass #1


Line to hourglass #2


Line to hourglass #3


Line to hourglass #4


Line to hourglass #5


Line to hourglass #6


Line to hourglass #7


Line to hourglass #8


Line to hourglass #9


Line to hourglass #10


Line to hourglass #11


Line to hourglass (animated)


Nice Von

“If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.” — John von Neumann

This quote is popular on web pages about von Neumann, and about computing and mathematics generally. It is apparently not from a published work of von Neumann’s, but Franz L. Alt recalls it as a remark made from the podium by von Neumann as keynote speaker at the first national meeting of the Association for Computing Machinery in 1947. The exchange at that meeting is described at the end of Alt’s brief article “Archaeology of computers: Reminiscences, 1945–1947”, Communications of the ACM, volume 15, issue 7, July 1972, special issue: Twenty-fifth anniversary of the Association for Computing Machinery, p. 694. Alt recalls that von Neumann “mentioned the ‘new programming method’ for ENIAC and explained that its seemingly small vocabulary was in fact ample: that future computers, then in the design stage, would get along on a dozen instruction types, and this was known to be adequate for expressing all of mathematics…. Von Neumann went on to say that one need not be surprised at this small number, since about 1,000 words were known to be adequate for most situations of real life, and mathematics was only a small part of life, and a very simple part at that. This caused some hilarity in the audience, which provoked von Neumann to say: ‘If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.’ ”

Source of John von Neumann quote

Hour Power

Would it be my favorite fractal if I hadn’t discovered it for myself? It might be, because I think it combines great simplicity with great beauty. I first came across it when I was looking at this rep-tile, that is, a shape that can be divided into smaller copies of itself:

Rep-4 L-Tromino


It’s called a L-tromino and is a rep-4 rep-tile, because it can be divided into four copies of itself. If you divide the L-tromino into four sub-copies and discard one particular sub-copy, then repeat again and again, you’ll get this fractal:

Tromino fractal #1


Tromino fractal #2


Tromino fractal #3


Tromino fractal #4


Tromino fractal #5


Tromino fractal #6


Tromino fractal #7


Tromino fractal #8


Tromino fractal #9


Tromino fractal #10


Tromino fractal #11


Hourglass fractal (animated)


I call it an hourglass fractal, because it reminds me of an hourglass:

A real hourglass


The hourglass fractal for comparison


I next came across the hourglass fractal when applying the same divide-and-discard process to a rep-4 square. The first fractal that appears is the Sierpiński triangle:

Square to Sierpiński triangle #1


Square to Sierpiński triangle #2


Square to Sierpiński triangle #3


[…]


Square to Sierpiński triangle #10


Square to Sierpiński triangle (animated)


However, you can rotate the sub-squares in various ways to create new fractals. Et voilà, the hourglass fractal appears again:

Square to hourglass #1


Square to hourglass #2


Square to hourglass #3


Square to hourglass #4


Square to hourglass #5


Square to hourglass #6


Square to hourglass #7


Square to hourglass #8


Square to hourglass #9


Square to hourglass #10


Square to hourglass #11


Square to hourglass (animated)


Finally, I was looking at variants of the so-called chaos game. In the standard chaos game, a point jumps half-way towards the randomly chosen vertices of a square or other polygon. In this variant of the game, I’ve added jump-towards-able mid-points to the sides of the square and restricted the point’s jumps: it can only jump towards the points that are first-nearest, seventh-nearest and eighth-nearest. And again the hourglass fractal appears:

Chaos game to hourglass #1


Chaos game to hourglass #2


Chaos game to hourglass #3


Chaos game to hourglass #4


Chaos game to hourglass #5


Chaos game to hourglass #6


Chaos game to hourglass (animated)


But what if you want to create the hourglass fractal directly? You can do it like this, using two isosceles triangles set apex-to-apex in the form of an hourglass:

Triangles to hourglass #1


Triangles to hourglass #2


Triangles to hourglass #3


Triangles to hourglass #4


Triangles to hourglass #5


Triangles to hourglass #6


Triangles to hourglass #7


Triangles to hourglass #8


Triangles to hourglass #9


Triangles to hourglass #10


Triangles to hourglass #11


Triangles to hourglass #12


Triangles to hourglass (animated)


Möbius Tripping

“In many cases, mathematics is an escape from reality. The mathematician finds his own monastic niche and happiness in pursuits that are disconnected from external affairs. Some practice it as if using a drug. Chess sometimes plays a similar role. In their unhappiness over the events of this world, some immerse themselves in a kind of self-sufficiency in mathematics. (Some have engaged in it for this reason alone.)” — Stanislaw Ulam (1909-84)