Glosarium

Pilih salah satu kata kunci di sebelah kiri…

FractalsThe Sierpinski Triangle

Waktunya membaca: ~20 min

One of the fractals we saw in the previous chapter was the Sierpinski triangle, which is named after the Polish mathematician Wacław Sierpiński. It can be created by starting with one large, equilateral triangle, and then repeatedly cutting smaller triangles out of its center.

Wacław Sierpiński was the first mathematician to think about the properties of this triangle, but it has appeared many centuries earlier in artwork, patterns and mosaics.

Here are some examples of floor tilings from different churches in Rome:

As it turns out, the Sierpinski triangle appears in a wide range of other areas of mathematics, and there are many different ways to generate it. In this chapter, we will explore some of them!

Pascal’s Triangle

You might already remember the Sierpinski triangle from our chapter on Pascal’s triangle. This is a number pyramid in which every number is the sum of the two numbers above. Tap on all the even numbers in the triangle below, to highlight them – and see if you notice a pattern:

1
1
1
1
2
1
1
3
3
1
1
4
6
4
1
1
5
10
10
5
1
1
6
15
20
15
6
1
1
7
21
35
35
21
7
1
1
8
28
56
70
56
28
8
1
1
9
36
84
126
126
84
36
9
1
1
10
45
120
210
252
210
120
45
10
1
1
11
55
165
330
462
462
330
165
55
11
1
1
12
66
220
495
792
924
792
495
220
66
12
1
1
13
78
286
715
1287
1716
1716
1287
715
286
78
13
1
1
14
91
364
1001
2002
3003
3432
3003
2002
1001
364
91
14
1
1
15
105
455
1365
3003
5005
6435
6435
5005
3003
1365
455
105
15
1
1
16
120
560
1820
4368
8008
11440
12870
11440
8008
4368
1820
560
120
16
1
1
17
136
680
2380
6188
12376
19448
24310
24310
19448
12376
6188
2380
680
136
17
1
1
18
153
816
3060
8568
18564
31824
43758
48620
43758
31824
18564
8568
3060
816
153
18
1

Pascal’s triangle can be continued downwards forever, and the Sierpinski pattern will continue with bigger and bigger triangles. You can already see the beginning of an even larger triangle, starting in row 16.

If two adjacent cells are divisible by 2, then their sum in the cell underneath must also be divisible by 2 – that’s why we can only get coloured triangles (or single cells). Of course, we can also try colouring all cells divisible by numbers other than 2. What do you think will happen in those cases?

Divisible by ${n}:

Here you can see a tiny version of the first 128 rows of Pascal’s triangle. We have highlighted all cells that are divisible by ${n} – what do you notice?

For every number, we get a different triangular pattern similar to the Sierpinski triangle. The pattern is particularly regular if we choose a . If the number has many different prime factors, the pattern looks more random.

The Chaos Game

Here you can see the three vertices of an equilateral triangle. Tap anywhere in the grey area to create a fourth point.

Let’s play a simple game: we pick one of the vertices of the triangle at random, draw a line segment between our point and the vertex, and then find the midpoint of that segment.

Now we repeat the process: we pick another random vertex, draw the segment from our last point, and then find the midpoint. Note that we colour these new points based on the colour of the vertex of the triangle we picked.

So far, nothing surprising has happened – but watch as we repeat the same process many more times:

This process is called the Chaos Game. There might be a few stray points at the beginning, but if you repeat the same steps many times, the distribution of dots starts to look exactly like the Sierpinski triangle!

There are many other versions of it – for example, we could start with a square or a pentagon, we could add additional rules like not being able to select the same vertex twice in a row, or we could pick the next point at a ratio other than 12 along the segment. In some of these cases, we’ll just get a random distribution of dots, but in other cases, we reveal even more fractals:

Triangle
Square
Pentagon

Did you discover the or this based on the golden ratio?

Cellular Automata

A cellular automaton is a grid consisting of many individual cells. Every cell can be in different “states” (e.g. different colours), and the state of every cell is determined by its surrounding cells.

In our example, every cell can be either black or white. We start with one row that contains just a single black square. In every following row, the colour of each cell is determined by the three cells immediately above. Tap the eight possible options below to flip their colour – can you find a set of rules that creates a pattern similar to the Sierpinski triangle?

There are two choices for each of the eight options, which means there are 28= possible rules in total. Some, like , look like the Sierpinski triangle. Others, like , look completely chaotic. It was discovered by Stephen Wolfram in 1983, and computers can even use them to generate random numbers!

Cellular automata show how highly complex patterns can be created by very simple rules – just like fractals. Many processes in nature also follow simple rules, yet produce incredibly complex systems.

In some cases, this can lead to the appearance of patterns that look just like cellular automata, for example the colours on the shell of this snail.

Conus textile, a venomous sea snail

Sierpinski Tetrahedra

There are many variants of the Sierpinski triangle, and other fractals with similar properties and creation processes. Some look two-dimensional, like the Sierpinski Carpet you saw above. Others look three-dimensional, like these examples:

Sierpinski Tetrahedra

Sierpinski Pyramid

Archie