Sierpiński triangle
Take a filled equilateral triangle, join the midpoints of its sides and remove the interior of the middle triangle. Three smaller triangles remain, each half as wide. Do the same with each of them, and again, forever. After n steps there are
The area left in the end is zero, but the shape is not empty: the sides of all the triangles remain. Doubling it gives three copies of itself, so its fractal dimension lies between a line and a surface:
History
The Polish mathematician Wacław Sierpiński described the triangle in 1915 as a curve in which every point is a branching point. A year later he described a square version, now called the Sierpiński carpet. The pattern itself is much older. The Cosmati family of stone workers laid it into the floors of Italian churches in the 12th and 13th centuries, for example in the cathedral of Anagni.
Interesting facts
- Color the odd numbers of Pascal's triangle and the even ones stay blank: the odd ones draw the Sierpiński triangle.
- The chaos game draws it with random numbers: start at any point, jump halfway towards a randomly chosen corner, mark the point and repeat. Michael Barnsley, who gave the method its name, described it in his 1988 book Fractals Everywhere.
- The area tends to zero, while the total length of the borders grows without limit: every step multiplies it by 3/2.
- The graph of the moves of the Tower of Hanoi puzzle has the same shape.
- A single curve without crossings, the Sierpiński arrowhead curve, comes arbitrarily close to the triangle.
How Image89 draws it
Image89 builds the exact triangles and fills them with dark blue on white; the gaps are the background. The preset depth is 7, which gives 37 = 2187 triangles. Details smaller than a few pixels would only blur, so the depth drops for small images until the smallest triangles are at least 4 pixels wide:
where s is the side of the triangle in pixels; a 32×32 image shows depth 2. The triangle is
fitted into the image without distortion, with a margin of 5% of the shorter side. The preset is in
the [types.sierpinski] section of the config.
Examples
- 1024×1024 PNG
- 1920×1080 JPEG
- 1024×1024 SVG
- 64×64 PNG with fewer levels