The Sierpinski triangle is a fractal, attracting fixed points, that overall is the shape of an equilateral triangle. The triangle, with each iteration, subdivides itself into smaller equilateral triangles. The Sierpinski triangle is amongst patterns that are mathematically generated and can be reproduced, regardless of the reduction or magnification.
Waclaw Sierpinski, a Polish Mathematician, was the first to study the fractal, examining in depth its mathematical properties. However, centuries before the works of the Polish Mathematician, artists and sculptors had made the pattern part of mosaics and artworks gracing the walls of cathedrals, churches, and basilicas. Perhaps, it is the elegance of the Sierpinski triangle that had made it such a celebrated decorative pattern even hundreds of years before the acclaimed mathematical publications of Sierpinski, after whom the gasket is infamously named.
Amongst the oldest records of the fractal, the cathedral of Anagni, Italy, stood tall, adorning Cosmati mosaics, which were created using self-similar structures. A few other historical records of the fractal before Sierpinski’s works were found wreathing the carpets of the Roman Basilica of Santa Maria in Cosmedin.
Like all knowledge, the Sierpinski triangle doesn’t originate at a single point in time but has had predecessors sharing some of its fundamental properties, such as the Apollonian gasket. It was first described in the 3rd century BC by Apollonius of Perga and further studied extensively in the 17th century by Gottfried Leibniz.
How to make Sierpinski Triangle
The construction of the fractal is possible through various methods, ranging in complexity and application but rest assured, the end result is always a symmetric masterpiece.
The Trema Removal —
The process starts with a single equilateral triangle.
For the first iteration, the shape is subdivided into four congruent, equilateral triangles where the center-most triangle is removed.
Once the first iteration has taken place, the same step can be repeated on each of the remaining three triangles, as was performed on the original shape, for the second iteration.
The principal step can be repeated an infinite number of times, with the remaining triangles. The removal method is based on the finite subdivision rule and conceptually is the easiest to understand and reproduce.
Shrink & duplicate —
Surprisingly this method doesn’t need to start with an equilateral triangle; in fact, it doesn’t even require a triangle at all for a Sierpinski triangle construction.
So to begin, select any geometrical object.
Once the decision regarding the shape has been made, the first iteration can be introduced by shrinking the shape two times and making three copies. Two of the three copies should form the base, whereas the third copy should be on top.
Similar to the previous method, the principal step of shrinking and duplicating is to be repeated at each iteration for each of the copies made
Chaos game —
Even amidst chaos, the construction of a Sierpinski triangle is made possible. This method, by far, is the most creative and elaborate way to produce this fractal. Chaos game goes one step further than the selection and duplication method by not requiring a geometrical shape to begin at all.
To begin, select three points that can be connected to create a triangle. However, there’s no requirement to actually form the triangle, just that these initial points shall be referred to as the main points.
After the main points have carefully been marked, select another point within the triangle formed by the main points, this will be referred to as the current position.
Further, randomly select any one of the main points and by stretching an imaginary line between the current position and the selected main point, select the midpoint of the imaginary line. The midpoint is the new current position.
The previous step can be repeated an infinite amount of times, each time with the new current position.
The selected points naturally accumulate in the pattern of the Sierpinski triangle.
The Arrowhead construction —
The process comprises repeated tempering of simpler curves until a Sierpinski triangle is formed.
The process begins with an individual line segment in the plane.
Each of the line segments of the curve is repeatedly replaced with three shorter segments that form 120° angles between two consecutive segments between each junction.
The first and last segments of the curve must either be parallel to the original line segment or form a 60° angle with it.
With each repetition, the curve becomes continuous. It approaches the shape that could trace out to form the Sierpinski triangle by a single continuous directed path, also known as the Sierpinski arrowhead.
A binary description of the Sierpinski triangle
A 17th-century French mathematician named Blaise Pascal studied a triangular array, which can be constructed by adding adjacent elements in preceding rows. The triangular array of the binomial coefficients is named after the French mathematician and is referred to as Pascal’s triangle.
The pascal triangle, at first sight, might only seem to share the triangular exterior with the Sierpinski triangle. However, upon further examination, it concludes that all in all, both of them are discussing the same geometrical pattern.
Here’s how to identify Pascal’s triangle as a Sierpinski triangle:
Construct Pascal’s triangle with 2n rows, where the even numbers can be colored white and the odd numbers red.
By simply assigning different colors, the Sierpinski triangle becomes evident.
Interestingly enough, as the limit of the 2n row Pascal’s triangle approaches infinity, it becomes the Sierpinski triangle in all aspects.
Towers of Hanoi
The ages-old puzzle, known as Towers of Hanoi, where disks of different sizes are to be moved between three pegs, starting from an initial peg and finally reaching the last three pegs. However, the rule that strictly must be followed is that no disk can be placed atop a smaller disk.
When the disks are moved from one state to another, the sequence can be translated to a Hanoi graph, a graphical representation of the remaining triangle after the nth step. In the limit, as n approaches infinity, the sequence of the Hanoi graph becomes more visible as an analog of the Sierpinski triangle.
The Sierpinski Triangle Formula
Perimeter of the Sierpinski Triangle:
With each iteration, the perimeter of the triangle increases by a factor of 3/2.
For example, at n=0, the perimeter of the triangle is unit 3, assuming length of each side is unit 1. Further at n=1, the perimeter of the triangle equals 9/2. And so on, with each recursion, the factor of 3/2 gets added to the previous perimeter.
Using this understanding of the perimeter, a general function of the number of iteration is arrived at to find the perimeter of the specific iteration:
Pn= P0 x (3/2)n
Taking the limit of the perimeter function above, it’s proved that the perimeter of the Sierpinski triangle:
Area of the Sierpinski Triangle:
With each iteration, the area of the Sierpinski triangle reduces by a factor of 3/4.
For example, at n=0, the area of the triangle is unit 1/2, assuming the length of each side to be unit 1. Further at n=1, the area of the triangle equals 3/8. And so on, with each recursion, the factor of 3/4 is deducted from the previous area.
Using the understanding given above, we conclude the general function of the number of iteration, to find the area at the specific iteration:
An= A0 x (3/4)n
Taking the limit of the area function above, it’s proved that the area of the Sierpinski triangle is zero:
Dimension of the Sierpinski triangle:
Depending on the dimensions of an object, when a side of the object is doubled, it tends to make particular set of copies. For instance, a 1 dimensional object, when doubled makes 2 copies, whereas, a 2 dimensional object when copied makes 4 copies and lastly, a 3 dimensional object makes 8 copies. This measure is important in determining the degree of roughness for a fractal.
A Sierpinski triangle tends to make 3 copies of itself when a side is doubled, therefore, it has a Hausdorff dimension of 1.585.
The Sierpinski Triangle Algorithm
The construction of a Sierpinski triangle might seem like an intricate job for any coder, regardless of the language. However, understanding the key elements of the geographical pattern makes it far easier to make the fractal.
The algorithm of the triangle is based on an infinite recursion, and the computation of one Sierpinski triangle comprises the construction of another. Thus, the algorithm must take into consideration its undying nature. The algorithm must be recursively infinite, for there isn’t any final form of the figure itself.
The algorithm on how to make a Sierpinski triangle can be defined as such:
Step 1: Draw an equilateral triangle, using points x, y, z
Step 2: Create three more Sierpinski fractals, each having the following vertices:
x, midpoint (x, y), midpoint (x, z)
y, midpoint (y, x), midpoint (y, z)
z, midpoint (z, x), midpoint (z, y)
How to make a Sierpinski triangle using Python
Due to the infinite nature of the Sierpinski gasket, it can be reproduced using the recursive function and turtle module of python.
Before delving in to the details of the code, it is imperative to understand what the recursive function exactly is. Recursion is a function in programming that calls upon itself. The basics behind a recursive problem solving is that the problem is divided into smaller, more easily manageable problems. Programmers generally define a base case to the recursion, allowing it to eventually stop the recursive function. In the absence of such a case, the recursion goes on infinitely.
The code for drawing a Sierpinski triangle using the turtle module of Python:
# Program to print Sierpinski Triangle import turtle def drawTriangle (points,color,myTurtle) : myTurtle.fillcolor(color) myTurtle.up() myTurtle.goto(points ,points) myTurtle.down() myTurtle.begin_fill() myTurtle.goto(points,points) myTurtle.goto(points,points) myTurtle.goto(points,points) myTurtle.end_fill() def mid(p1,p2): return ( (p1+p2) / 2, (p1 + p2) / 2) def drawsierpinski(points,degree,myTurtle): colormap = [‘blue’,’red’,’green’,’white’,’yellow’,violet’,’orange’] drawTriangle(points,colormap[degree],myTurtle) if degree > 0: drawsierpinski([points, mid(points, points), mid(points, points)], degree-1, myTurtle) drawsierpinski([points, mid(points, points), mid(points, points)], degree-1, myTurtle) drawsierpinski([points, mid(points, points), mid(points, points)], degree-1, myTurtle) def main(): myTurtle = turtle.Turtle() myscreen = turtle.Screen() myPoints = [[-100,-50],[0,100],[100,-50]] drawsierpinski(myPoints,3,myTurtle) myscreen.exitonclick() main()
Sierpinski triangle applications
The idea of fractals has existed for as long as human intellect began exploring different art forms and decorating cathedrals and churches with intricate geometrical patterns. Still, the term fractal was coined much later in 1975.
The Sierpinski triangle holds a long history of being carved into the walls of cathedrals and woven into carpets for royalty. Even today, the intricacy and elegance of the pattern leave much to desire and much to wonder. Artists have described the incorporation of fractals in their art pieces as chaotic yet something having a definite form.
However, the use of the Sierpinski triangle has not been limited to Catholic art, as it has revolutionized multiband communication, enabling, through its intricate pattern, to build and study antennas that can be used in any communication system with the requirement of high bandwidth, different frequency bands and through all operating frequencies, a constant radiation pattern.
The Sierpinski triangle also plays a vital role as a defining property of Rule 90. To elaborate on the concept of Rule 90, it is a one-dimensional cellular automaton with a binary state of existence, based on the exclusive conjunction function, where the state of any given cell can only be determined on the current state of the cell and its two nearest neighbors. In the time-space diagram of Rule 90, when the beginning stage has a single, non-zero cell, the diagram takes on the appearance of the Sierpinski gasket. And due to the strong tie between the Sierpinski triangle and Pascal’s triangle, the rule 90 time-space diagram represents a modulo-2 Pascal’s triangle.
The study of fractals has also greatly enabled scientists and astronomers to better understanding the peculiarities of the world around them. From the cones of the mountains, ridged surfaces, and snowflakes to the uniformness of space, fractals have hugely impacted the way we perceive our universe.