Arty Fish Haul

When is a fish a reptile? When it looks like this:

Fish from four isosceles right triangles


The fish-shape can be divided into eight identical sub-copies of itself. That is, it can be repeatedly tiled with copies of itself, so it’s an example of what geometry calls a rep-tile:

Fish divided into eight identical sub-copies


Fish divided again


Fish divided #4


Fish divided #5


Fish divided #6


Fish (animated rep-tiling)


Now suppose you divide the fish, then discard one of the sub-copies. And carry on dividing-and-discarding like that:

Fish discarding sub-copy 7 (#1)


Fish discarding sub-copy 7 (#2)


Fish discarding sub-copy 7 (#3)


Fish discarding sub-copy 7 (#4)


Fish discarding sub-copy 7 (#5)


Fish discarding sub-copy 7 (#6)


Fish discarding sub-copy 7 (#7)


Fish discarding sub-copy 7 (animated)


Here are more examples of the fish sub-dividing, then discarding sub-copies:

Fish discarding sub-copy #1


Fish discarding sub-copy #2


Fish discarding sub-copy #3


Fish discarding sub-copy #4


Fish discarding sub-copy #5


Fish discarding sub-copy #6


Fish discarding sub-copy #7


Fish discarding sub-copy #8


Fish discarding sub-copies (animated)


Now try a square divided into four copies of the fish, then sub-divided again and again:

Fish-square #1


Fish-square #2


Fish-square #3


Fish-square #4


Fish-square #5


Fish-square #6


Fish-square (animated)


The fish-square can be used to create more symmetrical patterns when the divide-and-discard rule is applied. Here’s the pattern created by dividing-and-discarded two of the sub-copies:

Fish-square divide-and-discard #1


Fish-square divide-and-discard #2


Fish-square divide-and-discard #3


Fish-square divide-and-discard #4


Fish-square divide-and-discard #5


Fish-square divide-and-discard #6


Fish-square divide-and-discard #7


Fish-square divide-and-discard #8 (delayed discard)


Fish-square divide-and-discard (animated)


Using simple trigonometry, you can convert the square pattern into a circular pattern:

Circular version


Square to circle (animated)


Here are more examples of divide-and-discard fish-squares:

Fish-square divide-and-discard #1


Fish-square divide-and-discard #2


Fish-square divide-and-discard #3


Fish-square divide-and-discard #4


Fish-square divide-and-discard #5


Fish-square divide-and-discard #6


And more examples of fish-squares being converted into circles:

Fish-square to circle #1 (animated)


Fish-square to circle #2


Fish-square to circle #3


Fish-square to circle #4


Fish-square to circle #5


Fish-square to circle #6


Square Routes Re-Re-Re-Re-Re-Re-Revisited

Suppose you trace all possible routes followed by a point inside a triangle jumping halfway towards one or another of the three vertices of the triangle. If you mark each jump, you get a famous geometrical shape called the Sierpiński triangle (or Sierpiński sieve).

Sierpiński triangle found by tracing all possible routes for a point jumping halfway towards the vertices of a triangle


The Sierpiński triangle is a fractal, because it contains copies of itself at smaller and smaller scales. Now try the same thing with a square. If you trace all possible routes followed by a point inside a square jumping halfway towards one or another of the four vertices of the square, you don’t get an obvious fractal. Instead, the interior of the square fills steadily (and will eventually be completely solid):

Routes of a point jumping halfway towards vertices of a square


Try a variant. If the point is banned from jumping towards the same vertex twice or more in a row, the routes trace out a fractal that looks like this:

Ban on choosing same vertex twice or more in a row


If the point is banned from jumping towards the vertex one place anti-clockwise of the vertex it’s just jumped towards, you get a fractal like this:

Ban on jumping towards vertex one place anti-clockwise of previously chosen vertex


And if the point can’t jump towards two places clockwise or anti-clockwise of the currently chosen vertex, this fractal appears (called a T-square fractal):

Ban on jumping towards the vertex diagonally opposite of the previously chosen vertex


That ban is equivalent to banning the point from jumping from the vertex diagonally opposite to the vertex it’s just jumped towards. Finally, here’s the fractal created when you ban the point from jumping towards the vertex one place clockwise of the vertex it’s just jumped towards:

Ban on jumping towards vertex one place clockwise of previously chosen vertex


As you can see, the fractal is a mirror-image of the one-place-anti-clockwise-ban fractal.

I discovered the ban-construction of those fractals more than twenty years ago. Then I found that I was re-discovering the same fractals when I looked at what first seemed like completely different ways of constructing fractals. There are lots of different routes to the same result. I’ve recently discovered yet another route. Let’s try what seems like an entirely different way of constructing fractals. Take a square and erect four new half-sized squares, sq1, sq2, sq3, sq4, on each corner. Then erect three more quarter-sized squares on the outward facing corners of sq1, sq2, sq3 and sq4. Carry on doing that and see what happens at the end when you remove all the previous stages of construction:













Animation of the new construction


Animation in black-and-white


It’s the T-square fractal again. Now try rotating the squares you add at stage 3 and see what happens (the rotation means that two new squares are added on adjacent outward-facing corners and one new square on the inward-facing corner):












Animation of the construction


It’s the one-place-clockwise-ban fractal again. Now try rotating the squares two places, so that two new squares are added on diagonally opposite outward-facing corners and one new square on the inward-facing corner:












Animation of the construction


It’s the same-vertex-ban fractal again. Finally, rotate squares one place more:

Animation of the construction



It’s the one-place-clockwise-ban fractal again. And this method isn’t confined to squares. Here’s what happens when you add 5/8th-sized triangles to the corners of triangles:















Animation of the construction


And here’s what happens when you add 5/13th-sized pentagons to the corners of pentagons:










Animation of the construction


Finally, here’s a variant on that pentagonal fractal (adding two rather than four pentagons at stage 3 and higher):















Animation of the construction


Previously pre-posted (please peruse):

Square Routes
Square Routes Revisited
Square Routes Re-Revisited
Square Routes Re-Re-Revisited
Square Routes Re-Re-Re-Revisited
Square Routes Re-Re-Re-Re-Revisited
Square Routes Re-Re-Re-Re-Re-Revisited

The Hex Fractor #3

In “Diamonds to Dust”, I showed how the Mitsubishi logo could be turned into a fractal, like this:

The Mitsubishi diamonds (source)


Mitsubishi logo to fractal (animated)


Now I want to look at another famous symbol and its fractalization. Here’s the symbol, the hexagram:

Hexagram, a six-pointed star


The hexagram can be dissected into twelve equilateral triangles like this:

Hexagram dissected into 12 equilateral triangles


If each triangle in the dissection is replaced by a hexagram, then the hexagram is dissected again into twelve triangles, you get a famous fractal, the Koch snowflake:






The Koch snowflake






The Koch snowflake again


Hexagram to Koch snowflake (animated)


If you color the triangles, you get something like this:







Colored hexagram to fractal (animated)


Of course, this is a very inefficient way to create a Koch snowflake, because the interior hexagrams consume processing time while not contributing to the fractal boundary of the snowflake. But in a way you can fully fractalize the hexagram if you draw only the point at the center of each triangle and then color it according to how many times the pixel in question has been drawn on before. To see how this works, first look at what happens when the center-points are represented in white:








White center-points (animated)


And here’s the fully fractalized hexagram, with colored center-points:







Colored center-points (animated)


Previously Pre-Posted…

The Hex Fractor #1 — hexagons and fractals
The Hex Fractor #2 — hexagons and fractals again
Diamonds to Dust — turning the Mitsubishi logo into a fractal

Trim Pickings

Here is an equilateral triangle divided into nine smaller equilateral triangles:

Rep-9 equilateral triangle


The triangle is a rep-tile — it’s tiled with repeating copies of itself. In this case, it’s a rep-9 triangle. Each of the nine smaller triangles can obviously be divided in their turn:

Rep-81 equilateral triangle


Rep-729 equilateral triangle


Rep-729 equilateral triangle again


Rep-6561 equilateral triangle


Rep-9 triangle repeatedly subdividing (animated)


How try trimming the original rep-9 triangle, picking one of the trimmings, and repeating in finer detail. If you choose six triangles in this pattern, you can create a symmetrical braided fractal:

Triangular fractal stage 1


Triangular fractal #2


Triangular fractal #3


Triangular fractal #3 (cleaning up)


Triangular fractal #3 (cleaning up more)


Triangular fractal #4


Triangular fractal #5


Triangular fractal #6


Triangular fractal (animated)


But this fractal using a three-triangle trim-picking isn’t symmetrical:

Trim-picking #1


Trim-picking #2


Trim-picking #3


Trim-picking #4


Trim-picking #5


To make it symmetric, you have to delay the trim, using the full rep-9 trim for the first stage:

Delayed trim-picking #1


Delayed trim-picking #2


Delayed trim-picking #3


Delayed trim-picking #4


Delayed trim-picking #5


Delayed trim-picking #6 (with first two stages as rep-9)


Delayed trim-picking (animated)


Here are some more delayed trim-pickings used to created symmetrical patterns:







Polykoch (Kontinued)

In “Polykoch!”, I looked at variants on the famous Koch snowflake, which is created by erecting new triangles on the sides of an equilaternal triangle, like this:

Koch snowflake #1


Koch snowflake #2


Koch snowflake #3


Koch snowflake #4


Koch snowflake #5


Koch snowflake #6


Koch snowflake #7


Koch snowflake (animated)


One variant is simple: the new triangles move inward rather than outward:

Inverted Koch snowflake #1


Inverted Koch snowflake #2


Inverted Koch snowflake #3


Inverted Koch snowflake #4


Inverted Koch snowflake #5


Inverted Koch snowflake #6


Inverted Koch snowflake #7


Inverted Koch snowflake (animated)


Or you can alternate between moving the new triangles inward and outward. When they always move outward and have sides 1/5 the length of the sides of the original triangle, the snowflake looks like this:


When they move inward, then always outward, the snowflake looks like this:


And so on:




Now here’s a Koch square with its new squares moving inward:

Inverted Koch square #1


Inverted Koch square #2


Inverted Koch square #3


Inverted Koch square #4


Inverted Koch square #5


Inverted Koch square #6


Inverted Koch square (animated)


And here’s a pentagon with squares moving inwards on its sides:

Pentagon with squares #1


Pentagon with squares #2


Pentagon with squares #3


Pentagon with squares #4


Pentagon with squares #5


Pentagon with squares #6


Pentagon with squares (animated)


And finally, an octagon with hexagons on its sides. First the hexagons move outward, then inward, then outward, then inward, then outward:

Octagon with hexagons #1


Octagon with hexagons #2


Octagon with hexagons #3


Octagon with hexagons #4


Octagon with hexagons #5


Octagon with hexagons (animated)


Polykoch!

This is how you form the famous Koch snowflake, in which at each stage you erect a new triangle on the middle of each line whose sides are 1/3 the length of the line:

Koch snowflake #1


Koch snowflake #2


Koch snowflake #3


Koch snowflake #4


Koch snowflake #5


Koch snowflake #6


Koch snowflake #7


Koch snowflake (animated)


Here’s a variant of the Koch snowflake, with new mid-triangles whose sides are 1/2 the length of the lines:

Koch snowflake (1/2 side) #1


Koch snowflake (1/2 side) #2


Stage #3


Stage #4


Stage #5


Stage #6


Stage #7


Stage #8


Koch snowflake (1/2 side) (animated)


But why stop at triangles? This is a Koch square, in which at each stage you erect a new 1/3 square on the middle of each line:

Koch square #1


Koch square #2


Koch square #3


Koch square #4


Koch square #5


Koch square #6


Koch square (animated)


And a Koch pentagon, in which at each stage you erect a pentagon on the middle of each line whose sides are 1 – (1/φ^2 * 2) = 0·236067977… the length of the line (I used 55/144 as an approximation of 1/φ^2):

Koch pentagon (side 55/144) #1


Koch pentagon #2


Koch pentagon #3


Koch pentagon #4


Koch pentagon #5


Koch pentagon #6


Koch pentagon (animated)


In this close-up, you can see how precisely the sprouting pentagons kiss at each stage:

Koch pentagon (close-up) #1


Koch pentagon (close-up) #2


Koch pentagon (close-up) #3


Koch pentagon (close-up) #4


Koch pentagon (close-up) #5


Koch pentagon (close-up) #6


Koch pentagon (close-up) (animated)


Period Panes

In his Penguin Dictionary of Curious and Interesting Numbers (1986), David Wells says that 142857 is “beloved of all recreational mathematicians”. He then says it’s the decimal period of the reciprocal of the fourth prime: “1/7 = 0·142857142857142…” And the reciprocal has maximum period. There are 6 = 7-1 digits before repetition begins, unlike the earlier prime reciprocals:


1/2 = 0·5
1/3 = 0·333...
1/5 = 0·2
1/7 = 0·142857 142857 142...

In other words, all possible remainders appear when you calculate the decimals of 1/7:


1*10 / 7 = 1 remainder 3 → 0·1
3*10 / 7 = 4 remainder 2 → 0·14
2*10 / 7 = 2 remainder 6 → 0·142
6*10 / 7 = 8 remainder 4 → 0·1428
4*10 / 7 = 5 remainder 5 → 0·14285
5*10 / 7 = 7 remainder 1 → 0·142857
1*10 / 7 = 1 remainder 3 → 0·142857 1
3*10 / 7 = 4 remainder 2 → 0·142857 14
2*10 / 7 = 2 remainder 6 → 0·142857 142...

That happens again with 1/17 and 1/19, but Wells says that “surprisingly, there is no known method of predicting which primes have maximum period.” It’s a simple question that involves some deep mathematics. Looking at prime reciprocals is like peering through a small window into a big room. Some things are easy to see, some are difficult and some are presently impossible.

In his discussion of 142857, Wells mentions one way of peering through a period pane: “The sequence of digits also makes a striking pattern when the digits are arranged around a circle.” Here is the pattern, with ten points around the circle representing the digits 0 to 9:

The digits of 1/7 = 0·142857142…


But I prefer, for further peers through the period-panes, to create the period-panes using remainders rather than digits. That is, the number of points around the circle is determined by the prime itself rather than the base in which the reciprocal is calculated:

The remainders of 1/7 = 1, 3, 2, 6, 4, 5…


Period-panes can look like butterflies or bats or bivalves or spiders or crabs or even angels. Try the remainders of 1/13. This prime reciprocal doesn’t have maximum period: 1/13 = 0·076923 076923 076923… So there are only six remainders, creating this pattern:

remainders(1/13) = 1, 10, 9, 12, 3, 4


The multiple 2/13 has different remainders and creates a different pattern:

remainders(2/13) = 2, 7, 5, 11, 6, 8


But 1/17, 1/19 and 1/23 all have maximum period and yield these period-panes:

remainders(1/17) = 1, 10, 15, 14, 4, 6, 9, 5, 16, 7, 2, 3, 13, 11, 8, 12


remainders(1/19) = 1, 10, 5, 12, 6, 3, 11, 15, 17, 18, 9, 14, 7, 13, 16, 8, 4, 2


remainders(1/23) = 1, 10, 8, 11, 18, 19, 6, 14, 2, 20, 16, 22, 13, 15, 12, 5, 4, 17, 9, 21, 3, 7


It gets mixed again with the prime 73, which doesn’t have maximum period and yields a plethora of period-panes (some patterns repeat with different n * 1/73, so I haven’t included them):

remainders(1/73)


remainders(2/73)


remainders(3/73)


remainders(4/73)


remainders(5/73)


remainders(6/73)


remainders(9/73)


remainders(11/73) (identical to pattern of 5/73)


remainders(12/73)


remainders(18/73)


101 yields a plethora of period-panes, but they’re variations on a simple theme. They look like flapping wings in this animated gif:

remainders of n/101 (animated)


The remainders of 137 yield more complex period-panes:

remainders of n/137 (animated)


And what about different bases? Here are period-panes for the remainders of 1/17 in bases 2 to 16:

remainders(1/17) in base 2


remainders(1/17) in b3


remainders(1/17) in b4


remainders(1/17) in b5


remainders(1/17) in b6


remainders(1/17) in b7


remainders(1/17) in b8


remainders(1/17) in b9


remainders(1/17) in b10


remainders(1/17) in b11


remainders(1/17) in b12


remainders(1/17) in b13


remainders(1/17) in b14


remainders(1/17) in b15


remainders(1/17) in b16


remainders(1/17) in bases 2 to 16 (animated)


But the period-panes so far have given a false impression. They’ve all been symmetrical. That isn’t the case with all the period-panes of n/19:

remainders(1/19) in b2


remainders(1/19) in b3


remainders(1/19) in b4 = 1, 4, 16, 7, 9, 17, 11, 6, 5 (asymmetrical)


remainders(1/19) in b5 = 1, 5, 6, 11, 17, 9, 7, 16, 4 (identical pattern to that of b4)


remainders(1/19) in b6


remainders(1/19) in b7


remainders(1/19) in b8


remainders(1/19) in b9


remainders(1/19) in b10 (identical pattern to that of b2)


remainders(1/19) in b11


remainders(1/19) in b12


remainders(1/19) in b13


remainders(1/19) in b14


remainders(1/19) in b15


remainders(1/19) in b16


remainders(1/19) in b17


remainders(1/19) in b18


remainders(1/19) in bases 2 to 18 (animated)


Here are a few more period-panes in different bases:

remainders(1/11) in b2


remainders(1/11) in b7


remainders(1/13) in b6


remainders(1/43) in b6


remainders in b2 for reciprocals of 29, 37, 53, 59, 61, 67, 83, 101, 107, 131, 139, 149 (animated)


And finally, to performativize the pun of “period pane”, here are some period-panes for 1/29, whose maximum period will be 28 (NASA says that the “Moon takes about one month to orbit Earth … 27.3 days to complete a revolution, but 29.5 days to change from New Moon to New Moon”):

remainders(1/29) in b4


remainders(1/29) in b5


remainders(1/29) in b8


remainders(1/29) in b9


remainders(1/29) in b11


remainders(1/29) in b13


remainders(1/29) in b14


remainders(1/29) in various bases (animated)


Pirouetting the Perimeter

Imagine a ballerina pirouetting on the perimeter of an equilateral triangle. Suppose that her armlength is half the radius of the circumscribed circle. If her right arm is represented in green and her right hand in yellow, this is one path that her right hand might trace, depending on the relative speeds of her feet and her pirouettes:

The perimeter of an equilateral triangle


A ballerina pirouetting on the perimeter stage #1


Perimeter pirouette #2


Perimeter pirouette #3


Perimeter pirouette #4


Perimeter pirouette #5


Perimeter pirouette #6


Perimeter pirouette #7


Perimeter pirouette #8


Perimeter pirouette #9


Perimeter pirouette #10

[…]

[…]

Perimeter pirouette #128


Perimeter pirouettes (animated)


The right hand of the ballerina during the pirouettes

The full path traced by the ballerina’s right hand


The paths change as you adjust speed and direction (clockwise or anticlockwise) of the pirouettes, the armlength of the ballerina, and so on:

speed = 0.5 (pirouettes)

speed = 0.5 (path)


speed = -1 (anticlockwise pirouettes)

speed = -1 (path)


speed = 1, armlength = 1/3 (pirouettes)

speed = 1, armlength = 1/3 (path)


speed = -0.5 (pirouettes)

speed = -0.5 (path)


speed = -0.75 (pirouettes)

speed = -0.75 (path)


And what about the paths produced by pirouettes on the perimeters of other polygons? Watch this space.

Back to LIFE

As pre-previously described on OotÜ-F, the English mathematician John Conway invented the Game of Life. It’s played on a grid of squares with counters. First you put counters on the grid in any pattern you please, random or regular, then you add or remove counters according to three simple rules applied to each square of the grid:

1. If an empty square has exactly three counters as neighbors, put a new counter on the square.
2. If a counter has two or three neighbors, leave it where it is.
3. If a counter has less than two or more than three neighbors, remove it from the grid.

There are lots of variants on Life and I wondered what would happen if you turned the grid into a kind of two-dimensional Pascal’s triangle. You start with 1 in the central square, then apply this rule to each square, [x,y], of the grid:

1. Add all numbers in the eight squares surrounding [x,y], then put that value in [x,y] (as soon as you’ve summed all other squares).

When a square is on the edge of the grid, its [x] or [y] value wraps to the opposite edge. Here’s this Pascal’s Life in action:

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

Pascal's square #1


0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 0 1 0 1 0 0
0 0 1 1 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

Pascal's square #2


0 0 0 0 0 0 0
0 1 2 3 2 1 0
0 2 2 4 2 2 0
0 3 4 8 4 3 0
0 2 2 4 2 2 0
0 1 2 3 2 1 0
0 0 0 0 0 0 0

Pascal's square #3


01 03 06 07 06 03 01
03 06 12 12 12 06 03
06 12 27 27 27 12 06
07 12 27 24 27 12 07
06 12 27 27 27 12 06
03 06 12 12 12 06 03
01 03 06 07 06 03 01

Pascal's square #4


021 038 056 067 056 038 021
038 070 100 124 100 070 038
056 100 132 168 132 100 056
067 124 168 216 168 124 067
056 100 132 168 132 100 056
038 070 100 124 100 070 038
021 038 056 067 056 038 021

Pascal's square #5


0285 0400 0560 0615 0560 0400 0285
0400 0541 0755 0811 0755 0541 0400
0560 0755 1070 1140 1070 0755 0560
0615 0811 1140 1200 1140 0811 0615
0560 0755 1070 1140 1070 0755 0560
0400 0541 0755 0811 0755 0541 0400
0285 0400 0560 0615 0560 0400 0285

Pascal's square #6


2996 3786 4697 5176 4697 3786 2996
3786 4785 5892 6525 5892 4785 3786
4697 5892 7153 7941 7153 5892 4697
5176 6525 7941 8840 7941 6525 5176
4697 5892 7153 7941 7153 5892 4697
3786 4785 5892 6525 5892 4785 3786
2996 3786 4697 5176 4697 3786 2996

Pascal's square #7


As you can see, the numbers quickly get big, so I adjusted the rule: sum the eight neighbors of [x,y], then put sum modulo 10 in [x,y]. The modulus of a number, n is its remainder when it’s divided by another number. For example, 3 modulo 10 = 3, 7 modulo 10 = 7, 10 modulo 10 = 0, 24 modulo 10 = 4, and so on. Pascal’s Life modulo 10 looks like this:

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

Pascal's square (n mod 10) #1


0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 0 1 0 1 0 0
0 0 1 1 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

Pascal's square (n mod 10) #2


0 0 0 0 0 0 0
0 1 2 3 2 1 0
0 2 2 4 2 2 0
0 3 4 8 4 3 0
0 2 2 4 2 2 0
0 1 2 3 2 1 0
0 0 0 0 0 0 0

Pascal's square (n mod 10) #3


1 3 6 7 6 3 1
3 6 2 2 2 6 3
6 2 7 7 7 2 6
7 2 7 4 7 2 7
6 2 7 7 7 2 6
3 6 2 2 2 6 3
1 3 6 7 6 3 1

Pascal's square (n mod 10) #4


1 8 6 7 6 8 1
8 0 0 4 0 0 8
6 0 2 8 2 0 6
7 4 8 6 8 4 7
6 0 2 8 2 0 6
8 0 0 4 0 0 8
1 8 6 7 6 8 1

Pascal's square (n mod 10) #5


5 0 0 5 0 0 5
0 1 5 1 5 1 0
0 5 0 0 0 5 0
5 1 0 0 0 1 5
0 5 0 0 0 5 0
0 1 5 1 5 1 0
5 0 0 5 0 0 5

Pascal's square (n mod 10) #6


6 6 7 6 7 6 6
6 5 2 5 2 5 6
7 2 3 1 3 2 7
6 5 1 0 1 5 6
7 2 3 1 3 2 7
6 5 2 5 2 5 6
6 6 7 6 7 6 6

Pascal's square (n mod 10) #7


7 5 3 3 3 5 7
5 9 5 1 5 9 5
3 5 1 7 1 5 3
3 1 7 6 7 1 3
3 5 1 7 1 5 3
5 9 5 1 5 9 5
7 5 3 3 3 5 7

Pascal's square (n mod 10) #8


Now add graphics and use n modulo 2 (where all even numbers → 0 and all odd numbers → 1). If you start with a 17×17 square with a square pattern of 1s, you’ll see it evolve like this when 0s are represented in black and 1s are represented in red:

n mod 2 on 17×17 square #1


n mod 2 #2


n mod 2 #3


n mod 2 #4


n mod 2 #5


n mod 2 #6


n mod 2 #7


n mod 2 #8


n mod 2 #9


n mod 2 #10


n mod 2 #11


n mod 2 #12


n mod 2 #13


n mod 2 #14


n mod 2 #15


n mod 2 #16


n mod 2 (animated)


As you can see, the original square re-appears. So do other patterns. Here’s an animated gif for n modulo 2 seeded with a pattern of 1s spelling LIFE:


Now try a spiral as the seed:

Spiral with n mod 2 #1


Spiral with n mod 2 #2


Spiral with n mod 2 #3


Spiral with n mod 2 #4


Spiral with n mod 2 #5


Spiral with n mod 2 #6


Spiral with n mod 2 #7


Spiral with n mod 2 #8


Spiral with n mod 2 #9


Spiral with n mod 2 #10


Spiral with n mod 2 #11


Spiral mod 2 (animated)


Now try the same pattern using modulo 3, where 0s are represented in black, 1s are represented in red and 2s in green. The pattern returns with different colors, i.e. with different underlying digits:

Spiral mod 3 on 27×27 square #1


Spiral mod 3 #2


Spiral mod 3 #3


Spiral mod 3 #4


Spiral mod 3 #5


Spiral mod 3 #6


Spiral mod 3 #7


Spiral mod 3 #8


Spiral mod 3 #9


Spiral mod 3 #10


Spiral mod 3 #11

[…]

Spiral mod 3 #19

[…]

Spiral mod 3 #28

[…]

Spiral mod 3 #37

[…]

Spiral mod 3 #46


Spiral mod 3 (animated)


LIFE mod 3 (animated)


Now try n modulo 5, with 0s represented in black, 1s represented in red, 2s in green, 3s in yellow and 4s in dark blue. Again the pattern returns in different colors:

Spiral mod 5 on 25×25 square #1


Spiral mod 5 #2


Spiral mod 5 #3


Spiral mod 5 #4


Spiral mod 5 #5


Spiral mod 5 #6

[…]

Spiral mod 5 #26

[…]

Spiral mod 5 #31

[…]

Spiral mod 5 #76

[…]

Spiral mod 5 #81


Spiral mod 5 (animated)


Finally, try a svastika modulo 7, with 0s represented in black, 1s represented in red, 2s in green, 3s in yellow, 4s in dark blue, 5s in purple and 6s in light blue:

Svastika mod 7 on 49×49 square #1


Svastika mod 7 #2


Svastika mod 7 #3


Svastika mod 7 #4


Svastika mod 7 #5


Svastika mod 7 #6


Svastika mod 7 #7


Svastika mod 7 #8

[…]

Svastika mod 7 #15

[…]

Svastika mod 7 #22

[…]

Svastika mod 7 #29

[…]

Svastika mod 7 #36

[…]

Svastika mod 7 #43


Svastika mod 7 (animated)


Previously Pre-Posted…

Eternal LIFE — a first look at the Game of Life

Eternal LIFE

The French mathematician Siméon-Denis Poisson (1781-1840) once said: « La vie n’est bonne qu’à deux choses : à faire des mathématiques et à les professer. » — “Life is good only for two things: doing mathematics and teaching mathematics.” The German philosopher Nietzsche wouldn’t have agreed. He thought (inter alia) that we must learn to accept life as eternally recurring. Everything we do and experience will happen again and again for ever. Can you accept life like that? Then your life is good.

But neither Poisson or Nietzsche knew that Life, with a capital L, would take on a new meaning in the 20th century. It became a mathematical game played on a grid of squares with counters. You start by placing counters in some pattern, regular or random, on the grid, then you add or remove counters according to three simple rules applied to each square of the grid:

1. If an empty square has exactly three counters as neighbors, put a new counter on the square.
2. If a counter has two or three neighbors, leave it where it is.
3. If a counter has less than two or more than three neighbors, remove it from the grid.

And there is a meta-rule: apply all three rules simultaneously. That is, you check all the squares on the grid before you add or remove counters. With these three simple rules, patterns of great complexity and subtlety emerge, growing and dying in a way that reminded the inventor of the game, the English mathematician John Conway, of living organisms. That’s why he called the game Life.

Let’s look at Life in action, with the seeding counters shown in green. Sometimes the seed will evolve and disappear, sometimes it will evolve into one or more fixed shapes, sometimes it will evolve into dynamic shapes that repeat again and again. Here’s an example of a seed that evolves and disappears:

Seeded with cross (arms 4+1+4) stage #1


Life stage #2


Life stage #3


Life stage #4


Life stage #5


Life stage #6


Life stage #7


Death at stage #8


Life from cross (animated)


The final stage represents death. Now here’s a cross that evolves towards dynamism:

Life seeded with cross (arms 3+1+3) stage #1


Life stage #2


Life stage #3


Life stage #4


Life stage #5


Life stage #6 (same as stage #4)


Life stage #7 (same as stage #5)


Life stage #8 (same as stage #4 again)


Life from cross (animated)


A line of three blocks swinging between horizontal and vertical is called a blinker:

Four blinkers


And here’s a larger cross that evolves towards stasis:

Life seeded with cross (arms 7+1+7) stage #1


Life stage #2


Life stage #3


Life stage #4


Life stage #5


Life stage #6


Life stage #7


Life stage #8


Life stage #9


Life stage #10


Life stage #11


Life stage #12


Life stage #13


Life stage #14


Life stage #15


Life stage #16


Life from cross (animated)


This diamond with sides of 24 blocks evolves towards even more dynamism:

Life from 24-sided diamond (animated)


Looping Life from 24-sided diamond (animated)


The game of Life obviously has many variants. In the standard form, you’re checking all eight squares around the square whose fate is in question. If that square is (x,y), these are the eight other squares you check:

(x+1,y+1), (x+0,y+1), (x-1,y+1), (x-1,y+0), (x-1,y-1), (x+0,y-1), (x+1,y-1), (x+1,y+0)

Now trying checking only four squares around (x,y), the ones above and below and to the left and the right:

(x+1,y+1), (x-1,y+1), (x-1,y-1), (x+1,y-1)

And apply a different set of rules:

1. If a square has one or three neighbors, it stays alive or (if empty) comes to life
2. Otherwise the square remains or becomes empty.

With that check and those rules, the seed first disappears, then re-appears, for ever (note that the game is being played on a torus):

Evolution of spiral seed


Eternally recurring spiral


This happens with any seed, so you can use Life to bring Nietzsche’s eternal recurrence to life:

Evolution of LIFE


Eternally recurring LIFE