Squaring the Triangle

It’s an interesting little exercise in elementary trigonometry to turn the Sierpiński triangle…

A Sierpiński triangle


…into its circular equivalent:

A Sierpiński trisc


You could call that a trisc, because it’s a triangle turned into a disc. And here’s triangle-and-trisc in one image:

Sierpiński triangle + Sierpiński trisc


But what’s the square equivalent of a Sierpiński triangle? This is:

Square from Sierpiński triangle


You can do that directly, as it were:

Sierpiński triangle → square


Or you can convert the triangle into a disc, then the disc into a square, like this:

Sierpiński triangle → trisc → square


Now try converting the triangle into a pentagon:

Pentagon from Sierpiński triangle


Sierpiński triangle → pentagon


Sierpiński triangle → trisc → pentagon


And a hexagon:

Hexagon from Sierpiński triangle


Sierpiński triangle → hexagon


Sierpiński triangle → trisc → hexagon


But you can also convert the Sierpiński trisc back into a Sierpiński triangle, then into a Sierpiński trisc again:

Sierpiński triangle → trisc → triangle → trisc


Sierpiński triangle → trisc → triangle → trisc (animated at Ezgif)


Sierpiński triangle → trisc → triangle → trisc (b&w)


Sierpiński triangle → trisc → triangle → trisc (b&w) (animated at Ezgif)


After triangles come squares. Here’s a shape called a T-square fractal:

T-square fractal


And here’s the circular equivalent of a T-square fractal:

T-square fractal → T-squisc


T-square fractal + T-squisc


If a disc from a triangle is a trisc, then a disc from a square is a squisc (it would be pentisc, hexisc, heptisc for pentagonal, hexagonal and heptagonal fractals). Here’s the octagonal equivalent of a T-square fractal:

Octagon from T-square fractal


As with the Sierpiński trisc, you can use the T-squisc to create the T-octagon:

T-square fractal → T-squisc → T-octagon (color)


Or you can convert the T-square directly into the T-octagon:

T-square fractal to T-octagon fractal

But using the squisc makes for interesting multiple images:


T-square fractal → T-squisc → T-octagon (b&w)


T-square fractal → T-squisc → T-octagon → T-squisc


T-square fractal → T-squisc → T-octagon → T-squisc (animated at Ezgif)


The conversions from polygon to polygon look best when the number of sides in the higher polygon are a multiple of the number of sides in the lower, like this:

Sierpiński triangle → Sierpiński hexagon → Sierpiński nonagon


Mods and Clockers

To understand clock-arithmetic, simply picture a clock-face with one hand and a big fat 0 in place of the 12. Now you can do some clock-arithmetic. For example, set the hour-hand to 5, then move on 4 hours. You’ve done this sum:

5 + 4 → 9

Now try 9 + 7. The hour-hand is already on 9, so move forward 7 hours:

9 + 7 → 4

Now try 3 + 8 + 1:

3 + 8 + 1 → 0

And 3 * 4:

4 * 3 = 4 + 4 + 4 → 0

That’s clock-arithmetic. But you’re not confined to 12-hour clocks. Here’s a 7-hour clock, where the 7 is replaced with a 0:

3 + 1 → 4
4 + 5 → 2
2 + 4 + 1 → 0
3 * 3 = 3 + 3 + 3 → 2

Another name for clock-arithmetic is modular arithmetic, because the clocks model the process of dividing a number by 12 or 7 and finding the remainder or residue — 12 or 7 is known as the modulus (and modulo is Latin for “by the modulus”).

5 + 4 = 9 → 9 / 12 = 0*12 + 9

(5 + 4) modulo 12 = 9


3 + 8 + 1 = 12 → 12 / 12 = 1*12 + 0

(3 + 8 + 1) modulo 12 = 0


19 / 12 = 1*12 + 7

19 mod 12 = 7


3 + 1 = 4 → 4 / 7 = 0*7 + 4

(3 + 1) mod 7 = 4


2 + 4 + 1 = 7 → 7 / 7 = 1*7 + 0

(2 + 4 + 1) mod 7 = 0


19 / 7 = 2*7 + 5

19 mod 7 = 5


Modular arithmetic can do wonderful things. One small but beautiful example is the way it can uncover hidden fractals in Pascal’s triangle:

Pascal’s Triangle (via Desmos)


How to create Pascal’s triangle (via Wikipedia)


If you color all numbers n mod 2 = 1 (i.e., odd numbers) in the triangle, they create the famous Sierpiński triangle:

The Sierpiński triangle in Pascal’s triangle (via Fractal Foundation)

Pascal’s triangle, n mod 2 = 1 (click for larger)


The Sierpiński triangle appears like this for all n mod 4 = 2 in Pascal’s triangle:

Pascal’s triangle, n mod 4 = 2 (click for larger)


And so on:

Pascal’s triangle, n mod 8 = 4


Pascal’s triangle, n mod 16 = 8


Pascal’s triangle, n mod 32 = 16


Pascal’s triangle, n mod 64 = 32


Pascal’s triangle, n mod 128 = 64


Pascal’s triangle, n mod 256 = 128


Pascal’s triangle, n mod 2,4,8… = 1,2,4… (animated via EzGif)


Post-Performative Post-Scriptum

There’s no need to calculate Pascal’s triangle in full to find the fractals above. The 10th row of Pascal’s triangle is this:

1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1

The 20th row is this:

1, 20, 190, 1140, 4845, 15504, 38760, 77520, 125970, 167960, 184756, 167960, 125970, 77520, 38760, 15504, 4845, 1140, 190, 20, 1

And the 29th is this:

1, 29, 406, 3654, 23751, 118755, 475020, 1560780, 4292145, 10015005, 20030010, 34597290, 51895935, 67863915, 77558760, 77558760, 67863915, 51895935, 34597290, 20030010, 10015005, 4292145, 1560780, 475020, 118755, 23751, 3654, 406, 29, 1

But you don’t need to consider those ever-growing numbers in the triangle when you’re finding fractals with modular arithmetic. When the modulus is 2, you just work with 0 and 1, that is, you add the previous numbers in the triangle and find the sum modulo 2. When the modulus is 4, you just work with 0, 1, 2 and 3, adding the numbers and finding the sum modulo 4. When it’s 8, you just work with 0, 1, 2, 3, 4, 5, 6 and 7, finding the sum modulo 8. And so on.

Trigging Triangles

A fractal is a shape in which a part looks like the whole. Trees are fractals. And lungs. And clouds. But there are man-made fractals too and probably the most famous of them all is the Sierpiński triangle, invented by the Polish mathematician Wacław Sierpiński (1882-1969):

Sierpiński triangle


There are many ways to create a Sierpiński triangle, but one of the simplest is to trace all possible routes followed by a point jumping halfway towards the vertices of an equilateral triangle. If you mark the endpoint of the jumps, the Sierpiński triangle appears as the routes get longer and longer, like this:

Point jumping 1/2 way towards vertices of an equilateral triangle (animated)


Once you’ve created a Sierpiński triangle like that, you can play with it. For example, you can use simple trigonometry to stretch the triangle into a circle:

Sierpiński triangle to circle stage #1


Sierpiński triangle to circle #2


Sierpiński triangle to circle #3


Sierpiński triangle to circle #4


Sierpiński triangle to circle #5


Sierpiński triangle to circle #6


Sierpiński triangle to circle #7


Sierpiński triangle to circle #8


Sierpiński triangle to circle #9


Sierpiński triangle to circle #10


Sierpiński triangle to Sierpiński circle (animated)


But the trigging of the triangle can go further. You can expand the Sierpiński circle further, like this:

Sierpiński circle expanded


Or shrink the Sierpiński triangle like this:

Shrinking Sierpiński triangle stage #1


Shrinking Sierpiński triangle #2


Shrinking Sierpiński triangle #3


Shrinking Sierpiński triangle #4


Shrinking Sierpiński triangle #5


Shrinking Sierpiński triangle #6


Shrinking Sierpiński triangle (animated)


You can also create new shapes using the jumping-point technique. Suppose that, as the point is jumping, you adjust its position outwards into the circumscribed circle whenever it lands within the boundaries of the governing triangle. But if the point lands outside those boundaries, you leave it alone. Using this adapted technique, you get a shape like this:

Adjusted Sierpiński circle


And if the point is swung by 60° after it’s adjusted into the circle, you get a shape like this:

Adjusted Sierpiński circle (60° swing)


Here are some animated gifs showing these shapes rotating in a full circle at various speeds:

Adjusted Sierpiński circle (swinging animation) (fast)


Adjusted Sierpiński circle (swinging animation) (medium)


Adjusted Sierpiński circle (swinging animation) (slow)


We Can Circ It Out

It’s a pretty little problem to convert this triangular fractal…

Sierpiński triangle (Wikipedia)


…into its circular equivalent:

Sierpiński triangle as circle


Sierpiński triangle to circle (animated)


But once you’ve circ’d it out, as it were, you can easily adapt the technique to fractals based on other polygons:

T-square fractal (Wikipedia)

T-square fractal as circle


T-square fractal to circle (animated)


Elsewhere other-accessible…

Dilating the Delta — more on converting polygonic fractals to circles…

Root Routes

Suppose a point traces all possible routes jumping half-way towards the three vertices of an equilateral triangle. A special kind of shape appears — a fractal called the Sierpiński triangle that contains copies of itself at smaller and smaller scales:

Sierpiński triangle, jump = 1/2


And what if the point jumps 2/3rds of the way towards the vertices as it traces all possible routes? You get this dull fractal:

Triangle, jump = 2/3


But if you add targets midway along each side of the triangle, you get this fractal with the 2/3rds jump:

Triangle, jump = 2/3, side-targets


Now try the 1/2-jump triangle with a target at the center of the triangle:

Triangle, jump = 1/2, central target


And the 2/3-jump triangle with side-targets and a central target:

Triangle, jump = 2/3, side-targets, central target


But why stop at simple jumps like 1/2 and 2/3? Let’s take the distance to the target, td, and use the function 1-(sqrt(td/7r)), where sqrt() is the square-root and 7r is 7 times the radius of the circumscribing circle:

Triangle, jump = 1-(sqrt(td/7r))


Here’s the same jump with a central target:

Triangle, jump = 1-(sqrt(td/7r)), central target


Now let’s try squares with various kinds of jump. A square with a 1/2-jump fills evenly with points:

Square, jump = 1/2 (animated)


The 2/3-jump does better with a central target:

Square, jump = 2/3, central target


Or with side-targets:

Square, jump = 2/3, side-targets


Now try some more complicated jumps:

Square, jump = 1-sqrt(td/7r)


Square, jump = 1-sqrt(td/15r), side-targets


And what if you ban the point from jumping twice or more towards the same target? You get this fractal:

Square, jump = 1-sqrt(td/6r), ban = prev+0


Now try a ban on jumping towards the target two places clockwise of the previous target:

Square, jump = 1-sqrt(td/6r), ban = prev+2


And the two-place ban with a central target:

Square, jump = 1-sqrt(td/6r), ban = prev+2, central target


And so on:

Square, jump = 1-sqrt(td/6.93r), ban = prev+2, central target


Square, jump = 1-sqrt(td/7r), ban = prev+2, central target


These fractals take account of the previous jump and the pre-previous jump:

Square, jump = 1-sqrt(td/4r), ban = prev+2,2, central target


Square, jump = 1-sqrt(td/5r), ban = prev+2,2, central target


Square, jump = 1-sqrt(td/6r), ban = prev+2,2, central target


Elsewhere other-accessible

Boole(b)an #2 — fractals created in similar ways

This Charming Dis-Arming

One of the charms of living in an old town or city is finding new routes to familiar places. It’s also one of the charms of maths. Suppose a three-armed star sprouts three half-sized arms from the end of each of its three arms. And then sprouts three quarter-sized arms from the end of each of its nine new arms. And so on. This is what happens:

Three-armed star


3-Star sprouts more arms


Sprouting 3-Star #3


Sprouting 3-Star #4


Sprouting 3-Star #5


Sprouting 3-Star #6


Sprouting 3-Star #7


Sprouting 3-Star #8


Sprouting 3-Star #9


Sprouting 3-Star #10


Sprouting 3-Star #11 — the Sierpiński triangle


Sprouting 3-star (animated)


The final stage is a famous fractal called the Sierpiński triangle — the sprouting 3-star is a new route to a familiar place. But what happens when you trying sprouting a four-armed star in the same way? This does:

Four-armed star #1


Sprouting 4-Star #2


Sprouting 4-Star #3


Sprouting 4-Star #4


Sprouting 4-Star #5


Sprouting 4-Star #6


Sprouting 4-Star #7


Sprouting 4-Star #8


Sprouting 4-Star #9


Sprouting 4-Star #10


Sprouting 4-star (animated)


There’s no obvious fractal with a sprouting 4-star. Not unless you dis-arm the 4-star in some way. For example, you can ban any new arm sprouting in the same direction as the previous arm:

Dis-armed 4-star (+0) #1


Dis-armed 4-Star (+0) #2


Dis-armed 4-Star (+0) #3


Dis-armed 4-Star (+0) #4


Dis-armed 4-Star (+0) #5


Dis-armed 4-Star (+0) #6


Dis-armed 4-Star (+0) #7


Dis-armed 4-Star (+0) #8


Dis-armed 4-Star (+0) #9


Dis-armed 4-Star (+0) #10


Dis-armed 4-star (+0) (animated)


Once again, it’s a new route to a familiar place (for keyly committed core components of the Overlord-of-the-Über-Feral community, anyway). Now try banning an arm sprouting one place clockwise of the previous arm:

Dis-armed 4-Star (+1) #1


Dis-armed 4-Star (+1) #2


Dis-armed 4-Star (+1) #3


Dis-armed 4-Star (+1) #4


Dis-armed 4-Star (+1) #5


Dis-armed 4-Star (+1) #6


Dis-armed 4-Star (+1) #7


Dis-armed 4-Star (+1) #8


Dis-armed 4-Star (+1) #9


Dis-armed 4-Star (+1) #10


Dis-armed 4-Star (+1) (animated)


Again it’s a new route to a familiar place. Now trying banning an arm sprouting two places clockwise (or anti-clockwise) of the previous arm:

Dis-armed 4-Star (+2) #1


Dis-armed 4-Star (+2) #2


Dis-armed 4-Star (+2) #3


Dis-armed 4-Star (+2) #4


Dis-armed 4-Star (+2) #5


Dis-armed 4-Star (+2) #6


Dis-armed 4-Star (+2) #7


Dis-armed 4-Star (+2) #8


Dis-armed 4-Star (+2) #9


Dis-armed 4-Star (+2) #10


Dis-armed 4-Star (+2) (animated)


Once again it’s a new route to a familiar place. And what happens if you ban an arm sprouting three places clockwise (or one place anti-clockwise) of the previous arm? You get a mirror image of the Dis-armed 4-Star (+1):

Dis-armed 4-Star (+3)


Here’s the Dis-armed 4-Star (+1) for comparison:

Dis-armed 4-Star (+1)


Elsewhere other-accessible

Boole(b)an #2 — other routes to the fractals seen above

Dissing the Diamond

In “Fractangular Frolics” I looked at how you could create fractals by choosing lines from a dissected equilateral or isosceles right triangle. Now I want to look at fractals created from the lines of a dissected diamond, as here:

Lines in a dissected diamond


Let’s start by creating one of the most famous fractals of all, the Sierpiński triangle:

Sierpiński triangle stage 1


Sierpiński triangle #2


Sierpiński triangle #3


Sierpiński triangle #4


Sierpiński triangle #5


Sierpiński triangle #6


Sierpiński triangle #7


Sierpiński triangle #8


Sierpiński triangle #9


Sierpiński triangle #10


Sierpiński triangle (animated)


However, you can get an infinite number of Sierpiński triangles with three lines from the diamond:

Sierpińfinity #1


Sierpińfinity #2


Sierpińfinity #3


Sierpińfinity #4


Sierpińfinity #5


Sierpińfinity #6


Sierpińfinity #7


Sierpińfinity #8


Sierpińfinity #9


Sierpińfinity #10


Sierpińfinity (animated)


Here are some more fractals created from three lines of the dissected diamond (sometimes the fractals are rotated to looked better):



















And in these fractals one or more of the lines are flipped to create the next stage of the fractal:




Previously pre-posted:

Fractangular Frolics — fractals created in a similar way

Dissecting the Diamond — fractals from another kind of diamond

Agnathous Analysis

In Mandibular Metamorphosis, I looked at two distinct fractals and how you could turn one into the other in one smooth sweep. The Sierpiński triangle was one of the fractals:

Sierpiński triangle


The T-square fractal was the other:

T-square fractal (or part thereof)


And here they are turning into each other:

Sierpiński ↔ T-square (anim)
(Open in new window if distorted)


But what exactly is going on? To answer that, you need to see how the two fractals are created. Here are the stages for one way of constructing the Sierpiński triangle:

Sierpiński triangle #1


Sierpiński triangle #2


Sierpiński triangle #3


Sierpiński triangle #4


Sierpiński triangle #5


Sierpiński triangle #6


Sierpiński triangle #7


Sierpiński triangle #8


Sierpiński triangle #9


When you take away all the construction lines, you’re left with a simple Sierpiński triangle:


Constructing a Sierpiński triangle (anim)


Now here’s the construction of a T-square fractal:

T-square fractal #1


T-square fractal #2


T-square fractal #3


T-square fractal #4


T-square fractal #5


T-square fractal #6


T-square fractal #7


T-square fractal #8


T-square fractal #9


Take away the construction lines and you’re left with a simple T-square fractal:

T-square fractal


Constructing a T-square fractal (anim)


And now it’s easy to see how one turns into the other:

Sierpiński → T-square #1


Sierpiński → T-square #2


Sierpiński → T-square #3


Sierpiński → T-square #4


Sierpiński → T-square #5


Sierpiński → T-square #6


Sierpiński → T-square #7


Sierpiński → T-square #8


Sierpiński → T-square #9


Sierpiński → T-square #10


Sierpiński → T-square #11


Sierpiński → T-square #12


Sierpiński → T-square #13


Sierpiński ↔ T-square (anim)
(Open in new window if distorted)


Post-Performative Post-Scriptum

Mandibular Metamorphosis also looked at a third fractal, the mandibles or jaws fractal. Because I haven’t included the jaws fractal in this analysis, the analysis is therefore agnathous, from Ancient Greek ἀ-, a-, “without”, + γνάθ-, gnath-, “jaw”.

Mandibular Metamorphosis

Here’s the famous Sierpiński triangle:

Sierpiński triangle


And here’s the less famous T-square fractal:

T-square fractal (or part of it, at least)


How do you get from one to the other? Very easily, as it happens:

From Sierpiński triangle to T-square (and back again) (animated)
(Open in new window if distorted)


Now, here are the Sierpiński triangle, the T-square fractal and what I call the mandibles or jaws fractal:

Sierpiński triangle


T-square fractal


Mandibles / Jaws fractal


How do you cycle between them? Again, very easily:

From Sierpiński triangle to T-square to Mandibles (and back again) (animated)
(Open in new window if distorted)


Elsewhere other-accessible…

Agnathous Analysis — a closer look at these shapes

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


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