Fractal algorithms

A long time ago, the site wrote a program which recursively replaces a line segment by a set of smaller line segments, thereby creating a fractal. (Many of the wallpapers in past pages have been generated in this way.) The next obvious step was iteratively to cut out parts of a square.

Fractal image

The new program is actually easier, since there is no need to cater for rotated line segments. To obtain richer fractals, you could combine two different cutouts.

Algorithms of this sort are hungry for memory- if your (old) compiler sets a 64kb limit on arrays, you will not get much detail. And whatever next? Iteratively removing parts of a cube?

1