3
$\begingroup$

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:

enter image description here enter image description here

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?

  • 2
    Nice -- carving bedrooms out of the bedrock leads to boredom, which is an anagram of "bedroom" :-)2011-08-06

1 Answers 1

2

You can create grid based fractals by recursive replication a template density matrix. The following figure (from Ref. 1) illustrates the first recursion of such a generation procedure.

enter image description hereAt each recursion, the output grid replicates itself multiplicatively over each element of the template matrix. Notice that this example produces a multifractal because not all non-zero elements are equal. Hence as you continue replicating you will create points with high mass accumulation. Whereas, if all non-zero elements would be equal there would be no variation and you would have monofractal.

Here is an example of a grid I created with the following template matrix. (I used my own Generic Fractal Generator, which you can find here). \begin{bmatrix}1 & 1 & 0 & 1 & 1 \\0 & 1 & 0 & 1 & 0 \\0 & 0 & 1 & 0 & 0\\0 & 0 & 1 & 0 & 0\\1 & 1 & 0 & 1 & 1 \end{bmatrix} enter image description here

References

  1. Kamer, Y., G. Ouillon, and D. Sornette (2013), Barycentric fixed-mass method for multifractal analysis, Phys. Rev. E, 88(2), 022922.