Fink Frakt

Pre-previously on Overlord-In-Terms-of-Issues-Around-Engagement-with-the-Über-Feral, I’ve looked at various ways of creating fractals by restricting the moves of a point jumping towards the vertices of a polygon. For example, the point can be banned from jumping towards the same vertex twice in a row. This time, I want to look at fractals created not by restriction, but by compulsion. If the point jumps towards vertex v and then tries to jump towards vertex v again, it will be forced to jump towards vertex v+1 instead, and so on.

You could call vv+1 a forced increment or finc. So these are finc fractals. In some cases, restriction and compulsion create the same fractals, but I’ve found some new fractals using compulsion. Consider the fractal created by the rule v[-2]+1, v[-1] → +0,+1, where the subscripts refer to the history of jumps: v[-2] is the jump-before-last, v[-1] is the last jump. If the new vertex, v[0], chosen is the same as v[-2]+1 (e.g., v[0] = 2 = v[-2]+1 = 1+1), then the forced increment is 0, i.e., the point is allowed to choose that jump. However, if v[0] = v[-1], then the forced increment is 1 and the point must jump towards v[-1]+1.

Here is the fractal in question:

v[-2]+1, v[-1] → +0,+1 (black-and-white)


v[-2]+1, v[-1] → +0,+1 (colour)


1,0 → +0,+1 (animated)


1,0 → +1,+0 (bw)


1,0 → +1,+0 (col)


1,0 → +1,+0 (anim)


1,0 → +1,+1 (bw)


1,0 → +1,+1 (col)


1,0 → +1,+1 (animated)


0,1 → +2,+1 (anim)


0,1 → +3,+1


1,0 → +0,+1


1,0 → +1,+0


1,1 → +0,+1


1,1 → +1,+2


1,1 → +1,+3


1,1 → +2,+1


1,2 → +0,+3


1,3 → +0,+1


2,2 → +0,+1


But suppose the history of jumps records not actual jumps, but the jumps the point wanted to make instead. In some cases, the jump made will be the same as the jump originally chosen, but in other cases it won’t. Here are some fractals using this method:

0 → +2


0 → +3


2 → +1


2 → +2


Get Your Prox Off #2

Serendipity is the art of making happy discoveries by accident. I made a mistake writing a program to create fractals and made the happy discovery of an attractive new fractal. And also of a new version of an attractive fractal I had seen before.

As I described in Get Your Prox Off, you can create a fractal by 1) moving a point towards a randomly chosen vertex of a polygon, but 2) forbidding a move towards the nearest vertex or the second-nearest vertex or third-nearest, and so on. If the polygon is a square, the four possible basic fractals look like this (note that the first fractal is also produced by banning a move towards a vertex that was chosen in the previous move):

v4_ban1

v = 4, ban = prox(1)
(ban move towards nearest vertex)


v4_ban2

v = 4, ban = prox(2)
(ban move towards second-nearest vertex)


v4_ban3

v = 4, ban = prox(3)


v4_ban4

v = 4, ban = prox(4)


This program has to calculate what might be called the order of proximity: that is, it creates an array of distances to each vertex, then sorts the array by increasing distance. I was using a bubble-sort, but made a mistake so that the program ran through the array only once and didn’t complete the sort. If this happens, the fractals look like this (note that vertex 1 is on the right, with vertex 2, 3 and 4 clockwise from it):
v4_ban1_sw1

v = 4, ban = prox(1), sweep = 1


v4_ban2_sw1

v = 4, ban = prox(2), sweep = 1


v4_ban3_sw1

v = 4, ban = prox(3), sweep = 1


v4_ban3_sw1_anim

(Animated version of v4, ban(prox(3)), sw=1)


v4_ban4_sw1

v = 4, ban = prox(4), sweep = 1


Note that in the last case, where ban = prox(4), a bubble-sort needs only one sweep to identify the most distant vertex, so the fractal looks the same as it does with a complete bubble-sort.

These new fractals looked interesting, so I had the idea of adjusting the number of sweeps in the incomplete bubble-sort: one sweep or two or three and so on (with enough sweeps, the bubble-sort becomes complete, but more sweeps are needed to complete a sort as the number of vertices increases). If there are two sweeps, then ban(prox(1)) and ban(prox(2)) look like this:

v4_ban1_sw2

v = 4, ban = prox(1), sweep = 2


v4_ban2_sw1

v = 4, ban = prox(2), sweep = 2


But the fractals produced by sweep = 2 for ban(prox(3)) and ban(prox(4)) are identical to the fractals produced by a complete bubble sort. Now, suppose you add a central point to the polygon and treat that as an additional vertex. If the bubble-sort is incomplete, a ban(prox(1)) fractal with a central point looks like this:

v4c_ban1_sw1

v = 4+c, ban = prox(1), sw = 1


v4c_ban1_sw2

v = 4+c, ban = prox(1), sw = 2


When sweep = 3, an attractive new fractal appears:

v4c_ban1_sw3

v = 4+c, ban = prox(1), sw = 3


v4c_ban1_sw3_anim

v = 4+c, ban = prox(1), sw = 3 (animated)


If you ban two vertices, the nearest and second-nearest, i.e. ban(prox(1), prox(2)), a complete bubble-sort produces a familiar fractal:

v4_ban12

v = 4+c, ban = prox(1), prox(2)


And here is ban(prox(2), prox(4)), with a complete bubble-sort:

v4c_ban24

v = 4, ban = prox(2), prox(4)


If the bubble-sort is incomplete, sweep = 1 and sweep = 2 produce these fractals for ban(prox(1), prox(2)):

v4_ban12_sw1

v = 4, ban = prox(1), prox(2), sw = 1


v4_ban12_sw2

v = 4, ban = prox(1), prox(2), sw = 2*

*The second of those fractals is identical to v = 4, ban(prox(2), prox(3)) with a complete bubble-sort.


Here is ban(prox(1), prox(5)) with a complete bubble-sort:

4c_ban15

v = 4, ban = prox(1), prox(5)


Now try ban(prox(1), prox(5)) with an incomplete bubble-sort:

v4_ban15_sw1

v = 4, ban = prox(1), prox(5), sw = 1


v4_ban15_sw2

v = 4, ban = prox(1), prox(5), sw = 2


When sweep = 3, the fractal I had seen before appears:

v4_ban15_sw3

v = 4, ban = prox(1), prox(5), sw = 3


v4_ban15_sw3_anim

v = 4, ban = prox(1), prox(5), sw = 3 (animated)


Where had I seen it before? While investigating this rep-tile (a shape that can be tiled with smaller versions of itself):

L-reptile

L-triomino rep-tile


L-reptile_anim

L-triomino rep-tile (animated)


The rep-tile is technically called an L-triomino, because it looks like a capital L and is one of the two distinct shapes you can create by joining three squares at the edges. You can create fractals from an L-triomino by dividing it into four copies, discarding one of the copies, then repeating the divide-and-discard at smaller and smaller scales:

L-reptile_1

L-triomino fractal stage #1


L-reptile_2

L-triomino fractal stage #2


L-reptile_3

L-triomino fractal stage #3


L-reptile_4

L-triomino fractal stage #4


L-reptile_5

L-triomino fractal stage #5


L-reptile_fractal_anim

L-triomino fractal (animated)

L-reptile_fractal_static

L-triomino fractal (close-up)

And here’s part of the ban(prox(1), prox(5)) fractal for comparison:

v4_ban15_sw3_mono


v4_ban15_sw3_col

So you can get to the same fractal (or versions of it), by two apparently different routes: random movement of a point inside a square or repeatedly dividing-and-discarding the sub-copies of an L-triomino. That’s serendipity!


Previously pre-posted:

Get Your Prox Off

Match of the Day

Some interesting shapes are mentioned in Derrick Niederman’s Number Freak (2010). Using identical matchsticks, what’s the smallest fully connected shape you can make in which two matches meet at every vertex? That is, what is the smallest 2-regular matchstick graph?

It’s an equilateral triangle:

2match

Now, what is the smallest fully connected shape you can make in which three matches meet at every vertex? That is, what is the smallest 3-regular matchstick graph? It uses twelve identical matches and looks like this:

3match

And here is the smallest known 4-regular matchstick graph, discovered by the German mathematician Heiko Harborth and using 104 identical matches:

4match

But Niederman says that “it’s impossible to create any arrangement in which five or more matchsticks meet at every vertex” (entry for “104”, pg. 230 of the 2012 paperback).

Polymorphous Perverticity

As I’ve explained before on Overlord of the Über-Feral, the planet’s premier purveyor of polygonic performativity (probably (possibly (perspectivistically))), it works with triangles and pentagons, but not with squares. And what is “it”? A simple procedure in which you create a polygon, choose a point inside it, then repeatedly move half-way towards a vertex chosen at random, marking each new position as you go.

pol3_4_5

When the polygon has three vertices, you get a Sierpiński triangle. When it has five, you get what might be called a  Sierpiński pentagon. When it has four, you get nothing. Or rather: you get everything, because the whole interior of the square gradually fills with points. But, as I’ve also explained before, there’s a simple way to change this. You can adapt the procedure so that a vertex can’t be chosen twice in a row, and so on.

When the rule is “No vertex twice in a row”, you get this fractal (colours change as a pixel is selected again):

pol4_0

But you can also use what might be a vertex increment, or vi, whereby you disallow vertices that are next to the previously chosen vertex, or two positions away, and so on. When the rule is “No vertex twice in a row”, the disallowed vertex is (v + 0), that is, vi = 0. If vi = 2 and the rule is disallow(v + 2), this fractal appears (when vi = 1, there’s no fractal):

pol4_2

v = 4, vi = 2

pol4_2_anim


You can extend these rules to apply not just to the previously chosen vertex, but also to the vertex chosen before that. Here are some fractals produced by the rule disallow(v[1] + vi[1], v[2] + vi[2]), where v[1] is the vertex previously chosen and v[2] is the vertex chosen before that:

pol4_1_2

v = 4, vi[1] = 1, vi[2] = 2

pol4_1_2_anim


pol4_2_0

v = 4, vi[1] = 2, vi[2] = 0

pol4_2_0_anim

pol4_2_0_white


pol4_2_1

v = 4, vi[1] = 2, vi[2] = 1

pol4_2_1_anim


pol4_2_2

v = 4, vi[1] = 2, vi[2] = 2

pol4_2_2_anim


And here are some fractals produced by the rule disallow(v[1] + vi[1], v[2] + vi[2], v[3] + vi[3]):

pol4_1_1_0

v = 4, vi[1] = 1, vi[2] = 1, vi[3] = 0

pol4_1_1_0_anim


pol4_1_1_2

v = 4, vi[1] = 1, vi[2] = 1, vi[3] = 2

pol4_1_1_2_anim


Applying these rules to pentagons rather than squares doesn’t produce such a dramatic difference, because the original procedure – choose any vertex at random, taking no account of previous choices – produces a fractal when v = 5, as noted above, but not when v = 4. Nevertheless, here are some fractals for v > 4:

pol5_0

v = 5, vi = 0


pol5_1

v = 5, vi = 1

pol5_1_anim


pol5_2

v = 5, vi = 2

pol5_2_anim


pol5_0_0

v = 5, vi[1] = 0, vi[2] = 0


pol5_1_0

v = 5, vi[1] = 1, vi[2] = 0


pol5_2_0

v = 5, vi[1] = 2, vi[2] = 0

pol5_2_0_anim


pol5_1_1

v = 5, vi[1] = 1, vi[2] = 1

pol5_1_1_anim


pol5_1_1_1

v = 5, vi[1] = 1, vi[2] = 1, vi[3] = 1


pol5_va2

v = 5, vi = various


pol6_1

v = 6, vi = 1

pol6_1_anim

Live and Let Dice

How many ways are there to die? The answer is actually five, if by “die” you mean “roll a die” and by “rolled die” you mean “Platonic polyhedron”. The Platonic polyhedra are the solid shapes in which each polygonal face and each vertex (meeting-point of the edges) are the same. There are surprisingly few. Search as long and as far as you like: you’ll find only five of them in this or any other universe. The standard cubic die is the most familiar: each of its six faces is square and each of its eight vertices is the meeting-point of three edges. The other four Platonic polyhedra are the tetrahedron, with four triangular faces and four vertices; the octahedron, with eight triangular faces and six vertices; the dodecahedron, with twelve pentagonal faces and twenty vertices; and the icosahedron, with twenty triangular faces and twelve vertices. Note the symmetries of face- and vertex-number: the dodecahedron can be created inside the icosahedron, and vice versa. Similarly, the cube, or hexahedron, can be created inside the octahedron, and vice versa. The tetrahedron is self-spawning and pairs itself. Plato wrote about these shapes in his Timaeus (c. 360 B.C.) and based a mathemystical cosmology on them, which is why they are called the Platonic polyhedra.

An animated gif of a tetrahedron

Tetrahedron


An animated gif of a hexahedron

Hexahedron

An animated gif of an octahedron

Octahedron


An animated gif of a dodecahedron

Dodecahedron

An animated gif of an icosahedron

Icosahedron

They make good dice because they have no preferred way to fall: each face has the same relationship with the other faces and the centre of gravity, so no face is likelier to land uppermost. Or downmost, in the case of the tetrahedron, which is why it is the basis of the caltrop. This is a spiked weapon, used for many centuries, that always lands with a sharp point pointing upwards, ready to wound the feet of men and horses or damage tyres and tracks. The other four Platonic polyhedra don’t have a particular role in warfare, as far as I know, but all five might have a role in jurisprudence and might raise an interesting question about probability. Suppose, in some strange Tycholatric, or fortune-worshipping, nation, that one face of each Platonic die represents death. A criminal convicted of a serious offence has to choose one of the five dice. The die is then rolled f times, or as many times as it has faces. If the death-face is rolled, the criminal is executed; if not, he is imprisoned for life.

The question is: Which die should he choose to minimize, or maximize, his chance of getting the death-face? Or doesn’t it matter? After all, for each die, the odds of rolling the death-face are 1/f and the die is rolled f times. Each face of the tetrahedron has a 1/4 chance of being chosen, but the tetrahedron is rolled only four times. For the icosahedron, it’s a much smaller 1/20 chance, but the die is rolled twenty times. Well, it does matter which die is chosen. To see which offers the best odds, you have to raise the odds of not getting the death-face to the power of f, like this:

3/4 x 3/4 x 3/4 x 3/4 = 3/4 ^4 = 27/256 = 0·316…

5/6 ^6 = 15,625 / 46,656 = 0·335…

7/8 ^8 = 5,764,801 / 16,777,216 = 0·344…

11/12 ^12 = 3,138,428,376,721 / 8,916,100,448,256 = 0·352…

19/20 ^20 = 37,589,973,457,545,958,193,355,601 / 104,857,600,000,000,000,000,000,000 = 0·358…

Those represent the odds of avoiding the death-face. Criminals who want to avoid execution should choose the icosahedron. For the odds of rolling the death-face, simply subtract the avoidance-odds from 1, like this:

1 – 3/4 ^4 = 0·684…

1 – 5/6 ^6 = 0·665…

1 – 7/8 ^8 = 0·656…

1 – 11/12 ^12 = 0·648…

1 – 19/20 ^20 = 0·642…

So criminals who prefer execution to life-imprisonment should choose the tetrahedron. If the Tycholatric nation offers freedom to every criminal who rolls the same face of the die f times, then the tetrahedron is also clearly best. The odds of rolling a single specified face f times are 1/f ^f:

1/4 x 1/4 x 1/4 x 1/4 = 1/4^4 = 1 / 256

1/6^6 = 1 / 46,656

1/8^8 = 1 / 16,777,216

1/12^12 = 1 / 8,916,100,448,256

1/20^20 = 1 / 104,857,600,000,000,000,000,000,000

But there are f faces on each polyhedron, so the odds of rolling any face f times are 1/f ^(f-1). On average, of every sixty-four (256/4) criminals who choose to roll the tetrahedron, one will roll the same face four times and be reprieved. If a hundred criminals face the death-penalty each year and all choose to roll the tetrahedron, one criminal will be reprieved roughly every eight months. But if all criminals choose to roll the icosahedron and they have been rolling since the Big Bang, just under fourteen billion years ago, it is very, very, very unlikely that any have yet been reprieved.