I have been experimenting with a 3-D extension to a Sierpinski triangle. If you consider a 4-faced pyramid, each face being an equilateral triangle, you can get the same recursive effect. It is a particularly interesting property of this shape that the total surface area is constant for any level of recursion! The total enclosed volume, however, decreases geometrically.

What I've done is to generate a few of these and render them using RayShade 4.0.The image below shows how this works for the first six levels of recursion:

0 iteration 1 iteration
2 iterations 3 iterations
4 iterations 5 iterations

For those who are curious about the rendering, here are some of the stats on that:

Recursion Depth Number of Triangles Rendering Time
1 4 22.47 sec
2 16 25.33 sec
3 64 31.48 sec
4 256 43.30 sec
5 1024 68.23 sec
6 4096 128.25 sec

Much of the slow down is due to the handling of an increasingly large number of shadow rays.


Another option is to compute the sizes and locations based on pyramids, but fill them with spheres. It gives an interesting visual effects, especially when the spheres are given a metallic texture. This image was made at 7 levels of recursion, which gives 4096 spheres.