This program renders the Menger sponge in various recursion levels. However, the main purpose of this software is not to generate nice fractal images. For this purpose there exist many much better suited software packages. I rather used this toy project to gain experience in various languages and tools.


menger sponge

Menger sponge

The Menger sponge is a fractal curve that is a three-dimensional extension of the Cantor set and Sierpinski carpet. It can be recursively generated by subdividing the given cube into 27 smaller cubes and removing the center cube as well as the 6 cubes at the center of each face. The volume of the Menger sponge converges to zero, while its surface converges to infinity.