Sierpinski (Triangle) for Other Polygons

2.7k Views Asked by At

The Sierpinski triangle can be "generated" by the algorihm where you start in the triangle, pick a vertex at random, then move half the distant towards it, draw a dot and then repeat this.

I wasn't able to find anything on whether doing this for other polygons produces similar sort of structures, so I tried it out and this is what I got:

enter image description here

After these there just seems to be a small hole in the middle. Well the square isn't interesting. But what about the holes in the pentagon and the looming star structure in the hexagon? Are these of any interest?

2

There are 2 best solutions below

1
On BEST ANSWER

As Zach points out, your pictures are images of self-similar sets. For the Sierpinski triangle and the square, the scaling factor of $1/2$ is not arbitrary; rather, it's chosen so that the individual pieces just touch one another without overlap. While self-similar sets can have overlap, they tend to be more visually interesting and are definitely easier to analyze when there is no overlap. To arrange the "just touching" scenario for other polygons, we need a smaller scaling factor. Here's what I mean for a regular pentagon and a regular hexagon:

enter image description here

Here are the resulting fractals, if we iterate the procedure. I included the septa-version and octo-version as well.

enter image description here

Generally, these types of sets are called poly-gaskets. A fun exercise is to find the general scaling factor to generate a poly-gasket and the resulting fractal dimension. You can find an implementation on Observable:

https://observablehq.com/@mcmcclur/poly-gaskets

0
On

The Sierpinski triangle is related to itself, that's what makes it a fractal. However, lets mathematically define this "similarity" transformation, a transformation that maps the triangle into itself.

The Sierpinski triangle can be visually broken up into three smaller triangles, each with side length half the original. Its also very similar in form to an equilateral triangle. Expressing this mathematically...

$$A=\begin{pmatrix} 1/2 & 0 \\ 0 & 1/2 \\ \end{pmatrix} \cdot \begin{pmatrix} S_x \\ S_y \end{pmatrix}+\begin{pmatrix} 0 \\ 0 \end{pmatrix}$$

$$B=\begin{pmatrix} 1/2 & 0 \\ 0 & 1/2 \\ \end{pmatrix} \cdot \begin{pmatrix} S_x \\ S_y \end{pmatrix}+\begin{pmatrix} 1/2 \\ 0 \end{pmatrix}$$

$$C=\begin{pmatrix} 1/2 & 0 \\ 0 & 1/2 \\ \end{pmatrix} \cdot \begin{pmatrix} S_x \\ S_y \end{pmatrix}+\begin{pmatrix} 1/4 \\ \sqrt 3/4 \end{pmatrix}$$

Assuming you understand matrix theory, it should be clear that the union of the A,B, and C transformations of $S$ (the triangle) which has both $S_x$ (x components) and $S_y$ (y components) is S again. Now look at the equations in more detail. Notice that the parts that just add to the total, are the vertexes of the triangle halfed. That's why your algorithm works. I'd suggest you investigate from here to find out whether or not this rule generalizes to other shapes...