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