Sierpinski Triangles and Carpets

What is it?

The Sierpinski triangle or the Sierpinski gasket or the Sierpinski Sieve, is a fractal named after the Polish mathematician Wacław Sierpiński who described it in 1915.

Originally constructed as a curve, this is a basic example of self-similar sets—it is a mathematically generated pattern that can be reproducible at any magnification or reduction.

An algorithm for obtaining arbitrarily close approximations to the Sierpinski triangle is as follows:
  1. Start with any triangle in a plane.

  2. Shrink the triangle to 1/2 height and 1/2 width, make three copies, and position the three shrunken triangles so that each triangle touches the two other triangles at a corner. Because the three shrunken triangles can between them cover only 3/4 of the area of the original there is a hole.

  3. Repeat step 2 with each of the smaller triangles. Note that this infinite process is not dependent upon the starting shape being a triangle.


512px-Sierpinski_triangle_evolution.svg.png

The first few steps starting, for example, from a square also tend towards a Sierpinski triangle.
512px-Sierpinski_triangle_evolution_square.svg.png


Chaos Game Algorithm

  1. Click Start to begin

  2. Click in a plane to create 3 points to form a triangle.

  3. Randomly click inside the triangle to create a point and consider that point the current position.

    One of the 3 vertex points will be randomly selected and a new point will be created half the distance from the current point and the selected vertex. The new point will become the current position.

  4. Iterate until you see the pattern:




The sequence of points generated by the chaos game is called the orbit of the seed. The process of repeatedly getting random elements and tracing the resulting orbit is called iteration. Iteration is important in many areas of mathematics. In fact, the branch of mathematics known as discrete dynamical systems theory is the study of such iterative processes.



member pmoews created an openSCAD file for Sierpinski Triangles and Carpets.

The triangles and carpets are limited to 3 or 4 iterations.