The last article I wrote was all about raytracing the Menger Sponge. When I implemented the Menger Sponge algorithm I was careful to keep a certain amount of configurability in the system. The pseudocode I showed in this article uses a fixed algorithm to decide if a cell is solid or not, but in the final production algorithm I used a parameter which allows me to change the fractal pattern.
This leaves me with the ability to try lots of different fractal patterns within the basic 3×3 cube. So first off, here’s the Menger Sponge with the corner taken out of the pattern…
Next up is a Menger sponge where the entire middle layer has been removed, this gives a fractal of sheets that looks pretty interesting.
This is a more interesting stalactite type fractal where the bottom layer has the corners taken out along with the normal menger sponge removals.
It’s interesting to play with these fractals and then stick them against the more regular solid primitives. For this image I used a basic sphere with a sheen specular highlight. I like the effect, and it does help to show a bit more of the scale of detail in the fractal.
It’s quite tricky to really show the full detail visible in the fractal, I’ll put some higher resolution renders in a slideshow gallery when I get a chance.
And finally I came across an interesting fractal that looks something like a spaceship from a film I used to watch occasionally as a child.
I’m sure there’s much more that can be done with this type of fractal, so no doubt I’ll be coming back to this in the near future. ![]()




