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

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