-
-
Notifications
You must be signed in to change notification settings - Fork 318
/
LostCity.xml
40 lines (35 loc) · 1.14 KB
/
LostCity.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<sequence values="BWRDIE">
<one in="B" out="I" steps="4" comment="make a few lakes by random growth"/>
<one in="IB" out="*I" steps="24000"/>
<convolution neighborhood="Moore">
<rule in="I" out="B" sum="5..8" values="B"/>
<rule in="B" out="I" sum="5..8" values="I"/>
</convolution>
<one in="B" out="R" steps="20" comment="make some land by a self-avoiding random walk with backtracking"/>
<markov>
<all in="RBB" out="WWR"/>
<all in="RWW" out="DDR"/>
</markov>
<all in="R" out="D"/>
<one in="BBWBB" out="**B**" comment="erode narrow sections of land"/>
<all>
<rule in="IW" out="*D"/>
<rule in="I*/*W" out="**/*D"/>
<rule in="DW" out="*D"/>
</all>
<prl in="D" out="B"/>
<prl steps="2">
<rule in="WB" out="*D"/>
<rule in="DB" out="*D" p="0.5"/>
</prl>
<convolution neighborhood="Moore">
<rule in="D" out="B" sum="5..8" values="B"/>
<rule in="B" out="D" sum="5..8" values="DI"/>
</convolution>
<one in="BB*/BBB/*B*" out="***/*E*/***"/>
<all in="*E*/EBE" out="***/*E*"/>
<prl in="D" out="B"/>
</sequence>
<!--
Based on the model by Andrew Kay https://github.com/kaya3/pattern-match-2d
-->