Sierpinsky

Sierpinsky Triangle

A Sierpinsky trianlge looks like:

The above example is not to much developed….but you will get the idea.

A Siepinsky triangle can be constructed the following way:

  1. Draw a triangle and color it completely black
  2. In every black triganle you see in the image do the following
    1. Create a white triangle by choosing the corners in the middle of the black triangle
  3. Iterate back to 2

With some imagination, or if you do not have enough of that, just try it on a piece of paper, you will start to see a picture like the above one.

So far so good. Mathematicians can talk to you for hours about the specifications and specific features of such a diagram. Unfortunately …. I’m not a mathematician.

 

However, there is another way to create such a triangle. To my mind it’s quite a mysterious proces. Well actually…the proces is not mysterious at all, the outcome …I do nog really get.

Proces:

  1. Draw the corner points of a triangle (A,B,C)
  2. Choose a random starting point (from now I will call this the iteration point)
  3. Choose a random corner (A,B,C)
  4. Draw a point at exactly the middle between the iteration point and the corner you chose
  5. The new drawn point is the new iteration point
  6. Iterate from 3

 

That’s it. There is no more to it.

I made a small python program which actually exactly does this. Following is the result:

sierpinsky python
Sierpinsky Triangle generated by randomness

To me this is really amazing. How can randomness (choosing the corners) actually create such an image. Another amazing fact : the starting point can be anywhere. It may lay in what in the end is white, it may lay in what in the end is black, it may even lay outside the initial 3 points. 

If you are interested you can get the program from github.com. And if you are really bored you can have a look at the whole repository

Leave a Reply

Your email address will not be published. Required fields are marked *