Go with the Floe

Fractals are shapes that contain copies of themselves on smaller and smaller scales. There are many of them in nature: ferns, trees, frost-flowers, ice-floes, clouds and lungs, for example. Fractals are also easy to create on a computer, because you all need do is take a single rule and repeat it at smaller and smaller scales. One of the simplest fractals follows this rule:

1. Take a line of length l and find the midpoint.
2. Erect a new line of length l x lm on the midpoint at right angles.
3. Repeat with each of the four new lines (i.e., the two halves of the original line and the two sides of the line erected at right angles).

When lm = 1/3, the fractal looks like this:

stick1

(Please open image in a new window if it fails to animate)

When lm = 1/2, the fractal is less interesting:

stick2

But you can adjust rule 2 like this:

2. Erect a new line of length l x lm x lm1 on the midpoint at right angles.

When lm1 = 1, 0.99, 0.98, 0.97…, this is what happens:

stick3

The fractals resemble frost-flowers on a windowpane or ice-floes on a bay or lake. You can randomize the adjustments and angles to make the resemblance even stronger:

frostfloe

Ice floes (see Owen Kanzler)

Ice floes (see Owen Kanzler)

Frost on window (see Kenneth G. Libbrecht, )

Frost on window (see Kenneth G. Libbrecht)

Persecution Complex

Imagine four mice sitting on the corners of a square. Each mouse begins to run towards its clockwise neighbour. What happens? This:

Four mice chasing each other

Four mice chasing each other


The mice spiral to the centre and meet, creating what are called pursuit curves. Now imagine eight mice on a square, four sitting on the corners, four sitting on the midpoints of the sides. Each mouse begins to run towards its clockwise neighbour. Now what happens? This:

Eight mice chasing each other

Eight mice chasing each other


But what happens if each of the eight mice begins to run towards its neighbour-but-one? Or its neighbour-but-two? And so on. The curves begin to get more complex:

square+midpoint+2


(Please open the following image in a new window if it fails to animate.)

square+midpoint+3


You can also make the mice run at different speeds or towards neighbours displaced by different amounts. As these variables change, so do the patterns traced by the mice:

• Continue reading Persecution Complexified

O Apollo

One of Swinburne’s most powerful, but least-known, poems is “The Last Oracle”, from Poems and Ballads, Second Series (1878). A song in honour of the god Apollo, it begins in lamentation:

Years have risen and fallen in darkness or in twilight,
   Ages waxed and waned that knew not thee nor thine,
While the world sought light by night and sought not thy light,
   Since the sad last pilgrim left thy dark mid shrine.
Dark the shrine and dumb the fount of song thence welling,
   Save for words more sad than tears of blood, that said:
Tell the king, on earth has fallen the glorious dwelling,
   And the watersprings that spake are quenched and dead.
Not a cell is left the God, no roof, no cover
   In his hand the prophet laurel flowers no more.

And ends in exultation:

         For thy kingdom is past not away,
            Nor thy power from the place thereof hurled;
         Out of heaven they shall cast not the day,
            They shall cast not out song from the world.
         By the song and the light they give
         We know thy works that they live;
         With the gift thou hast given us of speech
         We praise, we adore, we beseech,
         We arise at thy bidding and follow,
            We cry to thee, answer, appear,
   O father of all of us, Paian, Apollo,
            Destroyer and healer, hear! (“The Last Oracle”)

The power, grandeur and beauty of this poem remind me of the music of Beethoven. Swinburne is also, on a smaller scale and in a different medium, one of the geniuses of European art. He and Beethoven were both touched by Apollo, but Apollo was more than the god of music and poetry: he also presided mathematics. But then mathematics is much more visible, or audible, in music and poetry than it is in other arts. Rhythm, harmony, scansion, melody and rhyme are mathematical concepts. Music is built of notes, poetry of stresses and rhymes, and the rules governing them are easier to formalize than those governing, say, sculpture or prose.  Nor do poetry and music have to make sense or convey explicit meaning like other arts. That’s why I think a shape like this is closer to poetry or music than it is to painting:

Apollonian gasket (Wikipedia)

(Image from Wikipedia.)

This shape has formal structure and beauty, but it has no explicit meaning. Its name has a divine echo: the Apollonian gasket or net, named after the Greek mathematician Apollonius of Perga (c.262 BC–c.190 BC), who was named after Apollo, god of music, poetry and mathematics. The Apollonian gasket is a fractal, but the version above is not as fractal as it could be. I wondered what it would look like if, like fleas preying on fleas, circles appeared inside circles, gaskets within gaskets. I haven’t managed to program the shape properly yet, but here is my first effort at an Intra-Apollonian gasket:

Apollonian gasket

(If the image does not animate or looks distorted, please try opening it in a new window)

When the circles are solid, they remind me of ice-floes inside ice-floes:

Apollonian gasket (solid)

Simpler gaskets can be interesting too:

five-circle gasket


five+four-circle gasket


nine-circle gasket

Tri Again

All roads lead to Rome, so the old saying goes. But you may get your feet wet, so try the Sierpiński triangle instead. This fractal is named after the Polish mathematician Wacław Sierpiński (1882-1969) and quite a few roads lead there too. You can create it by deleting, jumping or bending, inter alia. Here is method #1:

Sierpinski middle delete

Divide an equilateral triangle into four, remove the central triangle, do the same to the new triangles.

Here is method #2:

Sierpinski random jump

Pick a corner at random, jump half-way towards it, mark the spot, repeat.

And here is method #3:

Sierpinski arrowhead

Bend a straight line into a hump consisting of three straight lines, then repeat with each new line.

Each method can be varied to create new fractals. Method #3, which is also known as the arrowhead fractal, depends on the orientation of the additional humps, as you can see from the animated gif above. There are eight, or 2 x 2 x 2, ways of varying these three orientations, so eight fractals can be produced if the same combination of orientations is kept at each stage, like this (some are mirror images — if an animated gif doesn’t work, please open it in a new window):

arrowhead1

arrowhead2

arrowhead3

arrowhead4

arrowhead5

If different combinations are allowed at different stages, the number of different fractals gets much bigger:

• Continuing viewing Tri Again.

The Call of Cthuneus

Cuneiform, adj. and n. Having the form of a wedge, wedge-shaped. (← Latin cuneus wedge + -form) (Oxford English Dictionary)

This fractal is created by taking an equilateral triangle and finding the centre and the midpoint of each side. Using all these points, plus the three vertices, six new triangles can be created from the original. The process is then repeated with each new triangle (if the images don’t animate, please try opening them in a new window):

triangle_div2

If the centre-point of each triangle is shown, rather than the sides, this is the pattern created:

triangle_div2_dots

Triangles in which the sides are divided into thirds and quarters look like this:

triangle_div3

triangle_div3_dots

triangle_div4

triangle_div4_dots

And if sub-triangles are discarded, more obvious fractals appear, some of which look like Lovecraftian deities and owl- or hawk-gods:


cthuneus1

cthuneus2

cthuneus3


Elsewhere Other-Accessible

Circus Trix — a later and better-illustrated look at these fractals

Curiouser and Cuneuser

This fractal is created by taking an equilateral triangle, then finding the three points halfway, i.e. d = 0.5, between the centre of the triangle and the midpoint of each side. Using all these points, plus the three vertices, seven new triangles can be created from the original. The process is then repeated with each new triangle:

7triangle

When sub-triangles are discarded, more obvious fractals appear, including this tristar, again using d = 0.5:

tristar

However, a simpler fractal is actually more fertile. This cat’s-cradle is created when d = 0.5:

catscradle

But as d takes values from 0.5 to 0, a very familiar fractal begins to appear: the Sierpiński triangle:

catscradle_expanding

When the values of d become negative, from -0.1 to -1, this is what happens:

catscradle_expanding_to_cuneus

Pre-previously posted (please peruse):

Curious Cuneus

Back to Bases

(N.B. I am not a mathematician and often make stupid mistakes in my recreational maths. Caveat lector.)

101 isn’t a number, it’s a label for a number. In fact, it’s a label for infinitely many numbers. In base 2, 1012 = 5; in base 3, 1013 = 10; 1014 = 17; 1015 = 26; and so on, for ever. In some bases, like 2 and 4, the number labelled 101 is prime. In other bases, it isn’t. But it is always a palindrome: that is, it’s the same read forward and back. But 101, the number itself, is a palindrome in only two bases: base 10 and base 100.1 Note that 100 = 101-1: with the exception of 2, all integers, or whole numbers, are palindromic in at least one base, the base that is one less than the integer itself. So 3 = 112; 4 = 113; 5 = 114; 101 = 11100; and so on.

Less trivial is the question of which integers set progressive records for palindromicity, or for the number of palindromes they create in bases less than the integers themselves. You might guess that the bigger the integer, the more palindromes it will create, but it isn’t as simple as that. Here is 10 represented in bases 2 through 9:

10102 | 1013* | 224* | 205 | 146 | 137 | 128 | 119*

10 is a palindrome in bases 3, 4, and 9. Now here is 30 represented in bases 2 through 29 (note that a number between square brackets represents a single digit in that base):2

111102 | 10103 | 1324 | 1105 | 506 | 427 | 368 | 339* | 30 | 2811 | 2612 | 2413 | 2214* | 2015 | 1[14]16 | 1[13]17 | 1[12]18 | 1[11]19 | 1[10]20 | 1921 | 1822 | 1723 | 1624 | 1525 | 1426 | 1327 | 1228
| 1129*

30, despite being three times bigger than 10, creates only three palindromes too: in bases 9, 14, and 29. Here is a graph showing the number of palindromes for each number from 3 to 100 (prime numbers are in red):

Graph of palindromes in various bases for n=3 to 100

The number of palindromes a number has is related to the number of factors, or divisors, it has. A prime number has only one factor,  itself (and 1), so primes tend to be less palindromic than composite numbers. Even large primes can have only one palindrome, in the base b=n-1 (55,440 has 119 factors and 61 palindromes; 65,381 has one factor and one palindrome, 1165380). Here is a graph showing the number of factors for each number from 3 to 100:

Graph of number of factors for n = 3 to 100

And here is an animated gif combining the two previous images:

Animated gif of number of palindromes and factors, n=3 to 100

Here is a graph indicating where palindromes appear when n, along the x-axis, is represented in the bases b=2 to n-1, along the y-axis:

Graph showing where palindromes occur in various bases for n = 3 to 1000

The red line are the palindromes in base b=n-1, which is “11” for every n>2. The lines below it arise because every sufficiently large n with divisor d can be represented in the form d·n1 + d. For example, 8 = 2·3 + 2, so 8 in base 3 = 223; 18 = 3·5 + 3, so 18 = 335; 32 = 4.7 + 4, so 32 = 447; 391 = 17·22 + 17, so 391 = [17][17]22.

And here, finally, is a table showing integers that set progressive records for palindromicity (p = number of palindromes, f = total number of factors, prime and non-prime):

n Prime Factors p f    n Prime Factors p f
3 3 1 1    2,520 23·32·5·7 25 47
5 5 2 1    3,600 24·32·52 26 44
10 2·5 3 3    5,040 24·32·5·7 30 59
21 3·7 4 3    7,560 23·33·5·7 32 63
36 22·32 5 8    9,240 23·3·5·7·11 35 63
60 22·3·5 6 11    10,080 25·32·5·7 36 71
80 24·5 7 9    12,600 23·32·52·7 38 71
120 23·3·5 8 15    15,120 24·33·5·7 40 79
180 22·32·5 9 17    18,480 24·3·5·7·11 43 79
252 22·32·7 11 17    25,200 24·32·52·7 47 89
300 22·3·52 13 17    27,720 23·32·5·7·11 49 95
720 24·32·5 16 29    36,960 25·3·5·7·11 50 95
1,080 23·33·5 17 31    41,580 22·33·5·7·11 51 95
1,440 25·32·5 18 35    45,360 24·34·5·7 52 99
1,680 24·3·5·7 20 39    50,400 25·32·52·7 54 107
2,160 24·33·5 21 39    55,440 24·32·5·7·11 61 119

Notes

1. That is, it’s only a palindrome in two bases less than 101. In higher bases, “101” is a single digit, so is trivially a palindrome (as the numbers 1 through 9 are in base 10).

2. In base b, there are b digits, including 0. So base 2 has two digits, 0 and 1; base 10 has ten digits, 0-9; base 16 has sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.