# 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)

# 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

# Square Routes Revisited

Take a square, divide it into four smaller squares, and discard the smaller square on the top right. Do the same to each of the subsquares, dividing it into four sub-subsquares, then discarding the one on the top right. And repeat with the sub-subsquares. And the sub-sub-squares. And the sub-sub-sub-squares. And so on. The result is a fractal like this:

Stage 1

Stage 2

Stage 3

Stage 4

Animated fractal

Final fractal (static)

It looks as though this procedure isn’t very fertile. But you can enrich it by rotating each of the subsquares in a different way, so that the discarded sub-subsquare is different. Here’s an example:

Stage 1

Stage 2

Stage 3

Stage 4

Stage 5

Stage 6

Stage 7

Animated fractal

Final fractal (static)

Here are more examples of how rotating the subsquares in different ways produces different fractals:

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Animated fractal

Static fractal

Previously pre-posted:

Square Routes — first look at this kind of fractal

# Corralling Chaos

“Down through the aether I saw the accursed earth turning, ever turning, with angry and tempestuous seas gnawing at wild desolate shores and dashing foam against the tottering towers of deserted cities.” — “The Crawling Chaos” (1921), Winifred Jackson and H. P. Lovecraft.

All the best people brood incessantly on the fact that a point inside a square jumping half-way towards a randomly chosen vertex will not create a fractal. Inside a triangle, yes: a fractal appears. Inside a pentagon too. But not inside a square:

Point jumping half-way towards a randomly chosen vertex

Instead, the interior of the square fills with random points: it crawls with chaos, you might say. However, fractals appear inside a square if the point is restricted in some way: banned from jumping towards a vertex twice in a row; banned from jumping towards the second-nearest vertex; and so on. Those restrictions are what might be called soft, because they take place in software (or in the brain of someone following the rule as a game or piece of performance art). Here’s what might be called a hard restriction that creates a fractal: the point cannot jump towards a randomly vertex if its jump passes over any part of the red upright cross:

Point cannot pass over red lines

I call this a barrier fractal. It’s obvious that the point cannot jump from one corner of the square towards the opposite corner, which creates bare space stretching from each vertex towards the tips of the upright cross. Less obvious is the way in which this bare space “cascades” into other parts of the square, creating a repeatedly branching and shrinking pattern.

When the barrier is a circle, a similar fractal appears:

If the point can also jump towards the center of the circle, this is what happens:

Now here’s an upright cross with a gap in the middle:

Here’s an upright cross when the point can also jump towards the center of the cross:

A slanted cross with a central attractor:

And a single horizontal stroke:

A slanted stroke — note pentagons:

Even if the barrier is small and set on an edge of the square, it affects the rest of the square:

A more attractive example of edge-affects-whole:

Circles away from the edges

Detail of previous image

Here the point can also jump towards the center of the square’s edges:

A more subtle barrier fractal uses the previous jumps of the point to restrict its next jump. For example, if the point cannot jump across the line created by its previous-but-one jump, it moves like this:

Jump can’t cross track of last-but-one jump (animated gif)

The fractal itself looks like this:

Rule: on jump #3, cannot jump across the line created by jump #1; on jump #4, cannot cross the line created by jump #2; and so on.

And this is the fractal if the point cannot jump across the line created by its previous-but-two jump:

Rule: on jump #4, cannot jump across the line created by jump #2; on jump #5, cannot cross the line created by jump #3; and so on

# 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):

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

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

v = 4, ban = prox(3)

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):

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

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

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

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

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:

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

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:

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

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

When sweep = 3, an attractive new fractal appears:

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

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:

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

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

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)):

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

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:

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

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

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

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

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

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

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-triomino rep-tile

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-triomino fractal stage #1

L-triomino fractal stage #2

L-triomino fractal stage #3

L-triomino fractal stage #4

L-triomino fractal stage #5

L-triomino fractal (animated)

L-triomino fractal (close-up)

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

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:

# Boldly Breaking the Boundaries

In “M.I.P. Trip”, I looked at fractals like this, in which a square is divided repeatedly into a pattern of smaller squares:

As you can see, the sub-squares appear within the bounds of the original square. But what if some of the sub-squares appear beyond the bounds of the original square? Then a new family of fractals is born, the over-fractals:

# M.i.P. Trip

The Latin phrase multum in parvo means “much in little”. It’s a good way of describing the construction of fractals, where the application of very simple rules can produce great complexity and beauty. For example, what could be simpler than dividing a square into smaller squares and discarding some of the smaller squares?

Yet repeated applications of divide-and-discard can produce complexity out of even a 2×2 square. Divide a square into four squares, discard one of the squares, then repeat with the smaller squares, like this:

Increase the sides of the square by a little and you increase the number of fractals by a lot. A 3×3 square yields these fractals:

And the 4×4 and 5×5 fractals yield more:

# Fractal Fourmulas

A square can be divided into four right triangles. A right triangle can be divided into a square and two more right triangles. These simple rules, applied again and again, can be used to create fractals, or shapes that echo themselves on smaller and smaller scales.

# V for Vertex

To create a simple fractal, take an equilateral triangle and divide it into four more equilateral triangles. Remove the middle triangle. Repeat the process with each new triangle and go on repeating it. You’ll end up with a shape like this, which is known as the Sierpiński triangle, after the Polish mathematician Wacław Sierpiński (1882-1969):

But you can also create the Sierpiński triangle one pixel at a time. Choose any point inside an equilateral triangle. Pick a corner of the triangle at random and move half-way towards it. Mark this spot. Then pick a corner at random again and move half-way towards the corner. And repeat. The result looks like this:

A simple program to create the fractal looks like this:

initial()
repeat
fractal()
altervariables()
until false

function initial()
v = 3 [v for vertex]
r = 500
lm = 0.5
endfunc

function fractal()
th = 2 * pi / v
[the following loop creates the corners of the triangle]
for l = 1 to v
x[l]=xcenter + sin(l*th) * r
y[l]=ycenter + cos(l*th) * r
next l
fx = xcenter
fy = ycenter
repeat
rv = random(v)
fx = fx + (x[rv]-fx) * lm
fy = fy + (y[rv]-fy) * lm
plot(fx,fy)
until keypressed
endfunc

function altervariables()
[change v, lm, r etc]
endfunc

In this case, more is less. When v = 4 and the shape is a square, there is no fractal and plot(fx,fy) covers the entire square.

When v = 5 and the shape is a pentagon, this fractal appears:

But v = 4 produces a fractal if a simple change is made in the program. This time, a corner cannot be chosen twice in a row:

function initial()
v = 4
r = 500
lm = 0.5
ci = 1 [i.e, number of iterations since corner previously chosen]
endfunc

function fractal()
th = 2 * pi / v
for l = 1 to v
x[l]=xcenter + sin(l*th) * r
y[l]=ycenter + cos(l*th) * r
chosen[l]=0
next l
fx = xcenter
fy = ycenter
repeat
repeat
rv = random(v)
until chosen[rv]=0
for l = 1 to v
if chosen[l]>0 then chosen[l] = chosen[l]-1
next l
chosen[rv] = ci
fx = fx + (x[rv]-fx) * lm
fy = fy + (y[rv]-fy) * lm
plot(fx,fy)
until keypressed
endfunc

One can also disallow a corner if the corner next to it has been chosen previously, adjust the size of the movement towards the chosen corner, add a central point to the polygon, and so on. Here are more fractals created with such variations:

# Sumbertime Views

Like 666 (see Revelation 13:18), 153 (see John 21:11) appears in the Bible. And perhaps for the same reason: because it is the sum of successive integers. 153 = 1+2+3+…+17 = Σ(17), just as 666 = Σ(36). So both numbers are sum-numbers or sumbers. But 153 has other interesting properties, including one that can’t have been known in Biblical times, because numbers weren’t represented in the right way. It’s also the sum of the cubes of its digits: 153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27. So 153 is a cube-sumber or 3-sumber. The other 3-sumbers are 370, 371 and 407. There are 4-sumbers too, like 1,634 = 1^4 + 6^4 + 3^4 + 4^4, and 5-sumbers, like 194,979 = 1^5 + 9^5 + 4^5 + 9^5 + 7^5 + 9^5, and 6-sumbers, like 548,834 = 5^6 + 4^6 + 8^6 + 8^6 + 3^6 + 4^6.

But there are no 2-sumbers, or numbers that are the sum of the squares of their digits. It doesn’t take long to confirm this, because numbers above a certain size can’t be 2-sumbers. 9^2 + 9^2 = 162, but 9^2 + 9^2 + 9^2 = 243. So 2-sumbers can’t exist above 99 and if you search that high you’ll find that they don’t exist at all. At least not in this house, but they do exist in the houses next door. Base 10 yields nothing, so what about base 9?

4^2 + 5^2 = 45[9] = 41[10]
5^2 + 5^2 = 55[9] = 50

And base 11?

5^2 + 6^2 = 56[11] = 61[10]
6^2 + 6^2 = 66[11] = 72

This happens because odd bases always yield a pair of 2-sumbers whose second digit is one more than half the base and whose first digit is the same or one less. See above (and the appendix). Such a pair is found among the 14 sumbers of base 47, which is the best total till base 157 and its 22 sumbers. Here are the 2-sumbers for base 47:

2^2 + 10^2 = 104
3^2 + 12^2 = 153
5^2 + 15^2 = 250
9^2 + 19^2 = 442
12^2 + 21^2 = 585
14^2 + 22^2 = 680
23^2 + 24^2 = 1,105
24^2 + 24^2 = 1,152
33^2 + 22^2 = 1,573
35^2 + 21^2 = 1,666
38^2 + 19^2 = 1,805
42^2 + 15^2 = 1,989
44^2 + 12^2 = 2,080
45^2 + 10^2 = 2,125

As the progressive records for 2-sumber-totals are set, subsequent bases seem to either match or surpass them, except in three cases below base 450:

2 in base 5
4 in base 7
6 in base 13
10 in base 43
14 in base 47
22 in base 157
8 in base 182*
16 in base 268*
30 in base 307
18 in base 443*

Totals for sums-of–squares in bases 4 to 450 (click for larger image)

Appendix: Odd Bases and 2-sumbers

Take an even number and half of that even number: say 12 and 6. 12 x 6 = 11 x 6 + 6. Further, 12 x 6 = 2 x 6 x 6 = 2 x 6^2 = 6^2 + 6^2. Accordingly, 66[11] = 6 x 11 + 6 = 12 x 6 = 6^2 + 6^2. So 66 in base 11 is a 2-sumber. Similar reasoning applies to every other odd base except base-3 [update: wrong!]. Now, take 12 x 5 = 2 x 6 x 5 = 2 x (5×5 + 5) = 5^2+5 + 5^5+5 = 5^5 + 5^5+2×5. Further, 5^5+2×5 = (5+1)(5+1) – 1 = 6^2 – 1. Accordingly, 56[11] = 11×5 + 6 = 12×5 + 1 = 5^2 + 6^2. Again, similar reasoning applies to every other odd base except base-3 [update: no — 1^2 + 2^2 = 12[3] = 5; 2^2 + 2^2 = 22[3] = 8]. This means that every odd base b, except base-3, will supply a pair of 2-sumbers with digits [d-1][d] and [d][d], where d = (b + 1) / 2.