How to Create Sierpinski Triangle Designs

Select Design\Examples\Sierpinski Triangles

The standard Sierpinski triangle consists of picking the midpoints along the three sides of a triangle and removing the triangle formed from those midpoints. This design dialog box allows you to pick other points a, b, and c along the three sides rather than just the midpoints. The points may be entered as a factor of the length of the respective side. The factors are measured in a counter-clockwise direction. So the factor for point a equals |Ba|/|BC|, the factor for point b equals |Cb|/|CA|, and the factor for point c equals |Ac|/|AB|. You can also use the mouse to move the points along the sides. A third option is to click on the Random button and have the program pick three points at random. You can move vertex A with the mouse by clicking on the small circle at vertex A. You can also position point A by entering the angles at each of the vertices A, B, and C. Vertex A is restricted so that ABC remains as an acute triangle.Click on the Default button to restore vertex A and the three midpoints to the standard Sierpinski equilateral triangle.

dialog box

The pedal triangle of an acute triangle is the triangle obtained by joining the feet of the three altitudes of the triangle. The Sierpinski pedal triangle is obtained by the same recursive construction as the regular Sierpinski triangle except by removing the pedal triangle at each stage. At the next iteration the remaining three triangles must be viewed in the correct orientation to preserve the similarity to the original triangle. This will generate a self-similar fractal. Click the Pedal button to position points a, b, and c to form the pedal triangle. Below is an example of a Sierpinski pedal triangle design and the resulting self-similar fractal.

SierPedalTriangleDesign SierPedalTriangleExample

Rather than constructing the Sierpinski triangle by removing interior triangles, you can view the construction as transforming the large triangle ABC into each of three smaller triangles by mapping each vertex of ABC to a vertex of the smaller triangle.

polygon method 1 design method 1 fractal

Method 1 is the same as removing the interior triangle since the orientation of the vertices is not changed. The functions in the IFS map the vertices of triangle ABC in the following way (see the labeling in the window above):

F1(ABC) = cBa
F2(ABC) = baC
F3(ABC) = Acb
So map F1 maps vertex A of the large triangle to vertex c of the small triangle, vertex B to vertex B, and vertex C to vertex a.

polygon method 2 design method 2 fractal

Method 2 maps one vertex to itself, but switches the orientation of the other two vertices. This is the method that is used for pedal triangles. The functions in the IFS map the vertices of triangle ABC in the following way (see the labeling in the window above):

F1(ABC) = aBc
F2(ABC) = abC
F3(ABC) = Abc

polygon method 3 design method 3 fractal

Method 3 keeps the same orientation for the vertices in the larger and smaller triangles, but reverses the direction. The functions in the IFS map the vertices of triangle ABC in the following way (see the labeling in the window above):

F1(ABC) = caB
F2(ABC) = Cab
F3(ABC) = cAb

Once you have chosen the method and parameters, click on the "Create IFS" button to create the IFS in the IFS window. Check the box to "Use oriented triangle design" to use an oriented triangle to illustrate the design (as shown in the examples above). The program will save the values of the three angles, the coordinates of the points A, B, and C, the values for the three factors, and the method selected as a comment for the IFS.

Check the "Random Twist" box to create a twisted Sierpinski triangle. This construction starts out exactly like describe above. At each iteration, however, each of the points a, b, and c is moved a small amount in a random direction to the points a', b', and c' (see figure on the left). The example on the right shows a twisted Sierpinski triangle after 5 iterations. The image is no longer a strict self-similar fractal because of the random variations.
twist twisted ST
You can adjust the amount of twisting using the slider. There are 10 positions from no twist to large twisting. The Page Up and Page Down keys will move the slider among the four basic choices while the left and right arrow keys will move it in smaller increments. The image can be drawn in one color or drawn using the three IFS colors. You can also choose whether to fill each triangle as it is drawn or just draw the sides. The up and down arrow keys can be used to increase or decrease the iteration count. You can specify a specific iteration by typing ctrl-n for n from 1 to 8. Clicking on the Draw button will also create the underlying IFS code without the random twists in the IFS window. The ctrl-A, ctrl-F, and ctrl-G keyboard shortcuts will toggle the axes, fixed points, and grid, respectively, in the fractal window.


For information about Sierpinski pedal triangles, see the article by Ding Jiu, Richard Hitt, and Xin-Min Zhange at For more information about twisted Sierpinski triangles, see section 12.4 in Excursions in Modern Mathematics by Peter Tannenbaum.