# How can I generate grid-based Fractals?

Please let me know if there's a better site to ask a question like this.

I play a little indie game called Dwarf Fortress and a major part of the game involves building the titular Fortress for your Dwarves. Some of these tasks, however, quickly become so monotonous as to become tedious. Specifically, bedrooms. I find a great deal of the boredom in carving another dozen bedrooms out of the bedrock can be eliminated if I'm working with a pattern.

The ever-useful Dwarf Fortress Wiki contains examples of "Fractal" living arrangements that are especially aesthetically pleasing:

However, I'm interested in moving beyond these two pictures alone, seeking to generate my own Fractals and from them develop new bedroom designs!

I've searched around on the web, and though I've found several Fractal generators (in one form or another), none of the generators produce output that is readily adaptable to Dwarf Fortress' grid-based gameplay, filled with curves, and other hard-to-reproduce aspects.

I was hoping that there was some way to generate fractals that conform to a standard grid like the shapes outlined above, or otherwise limit the resultant shapes to those with 90* angles. Is there a mathematical way to create (or limit) a fractal to such a 2-d grid?

-
There will be many ways. From what I understand of the problem, you could probably devise some kind of L-system (you'll have to scroll down to see why that link is relevant). Alternatively - and I'm not so sure about this - if you're okay breaking self-similarity and symmetry you could look at cellular automata. – anon Aug 6 '11 at 7:19
Nice -- carving bedrooms out of the bedrock leads to boredom, which is an anagram of "bedroom" :-) – joriki Aug 6 '11 at 7:49