Sierpinski Tetrahedron

After using the chaos game to generate the sierpinski triangle in the last post, I wanted to see if the same iterative process worked in 3D to create the Sierpinski Tetrahedron (aka Tetrix) seen below:

As it turns out, the iterative process is exactly the same, except instead of 3 markers, you now use 4 markers, each positioned at one of the vertices of a tetrahedron. Here’s a video of the fractal being drawn:

Source code

The Chaos Game and the Sierpinski Triangle

We usually imagine images that are randomly generated to appear fairly arbitrary, without any noticeable patterns whatsoever. As it turns out, however, randomness can generate structures and patterns with some very interesting characteristics.

There’s a very interesting class of games known as the chaos games, which involve randomness. I won’t go too deeply into the topic here, but I’ll introduce a simple version.

Imagine you have an equilateral triangle, and at each vertex of the triangle, you place a marker. Now, pick a point anywhere on the plane of the triangle. It can be inside the triangle or outside the triangle, doesn’t matter. Then randomly choose one of the 3 markers, and draw a point midway between the marker and the point you picked. Move to the midpoint, and randomly choose one of the markers again and draw the new midpoint. Repeat this process.

 So what happens after several thousand iterations? As it turns out, the Sierpinski Triangle is generated. This is a pretty surprising result, but below is the image after 5000 iterations, from a program I wrote that runs the chaos game iteration:

Here’s a video of the dots being drawn:

Source code


Created a sphereflake, which is a 3D version of the Koch snowflake, using spheres. It was originally developed by Eric Haines.

As I could only find photographs of the sphereflake, but not descriptions of the actual iteration, I had to do some trial and error to place the next-level iterated spheres in the right locations. I’m still not sure if this is the exact same one as Haines developed, but it looks pretty close.

There are nine spheres created in each iteration. Six of them are placed 10 degrees below the equator of the orignal sphere, spaced 60 degrees apart from one another. The other three are positioned by finding the midpoint between two of these six spheres, for every other sphere, and then moving upwards 60 degrees. It’s probably a lot clearer to just look at the code.

Source code

Chaos and Fractals, Koch Curve, and Koch Snowflake

I finished reading Chaos and Fractals a few days ago. If you’re looking for a good introductory book on fractals and chaos that doesn’t shy away from mathematics, I highly recommend it. I read the book straight through from cover to cover, and while there are still quite a lot of topics I don’t understand and will be referencing the text quite a bit in the next while, it was good to get an overall view of the field.

Koch Curve

I started to write a few programs to explore the topics covered in the book. One of the earliest fractals described is the Koch curve, named after the Swedish mathematician Helge von Koch.

The curve has many interesting properties, one of which being that its length is infinite. Additionally, while it is continuous everywhere, it is differentiable nowhere.

I wrote a quick sketch in Cinder to create the Koch curve. Of course, being a mere representation, it’s not a real fractal, but it at least gives you an idea of what the curve looks like and the program does use iterations to generate the shape.

Source code

Koch Snowflake

Combining three Koch curves, one can create the Koch snowflake, shown below.

Source code

The programs are pretty simple, and I wrote them mainly just to get the structure of the iterations down. I’m be exploring variations of the Koch snowflake the next few days, and finding ways to add color to the shape. I’ll also be exploring 3D structures that follow the same properties.


At the suggestion of a friend who’s also an artist, I’ve decided to start an email newsletter. I’ll be sending out news and updates about my work, as well as announcements of upcoming events and exhibits.

If you’re interested in receiving these emails, you can find the subscription form on the contact page.