Code: Select all
startshape TREE
shape TREE
rule
{
CIRCLE[s 0.1 b 0.5 sat 1]
TREE[s 0.99 y 0.05 h .7]
}
rule 3%
{
BRANCH[]
TREE[s 0.99 y 0.05 h .7]
}
shape BRANCH
{
BRANCH_LEFT [ ]
BRANCH_LEFT[ flip 90]
}
shape BRANCH_LEFT
rule {
TREE [ s 0.9 rotate 15 ]
}
rule {
TREE [ rotate 15 ]
}
rule {
TREE [ rotate 20 ]
}
The problem is that it never stops!
I think the cause of this is the fact that each TREE can spawn many branches, each of which is a TREE that can spawn more branches. So the tree gets very wide before it gets tall and finishes.
How can I reduce the number of branches that are spawned? I've tried messing around with the weights etc. but that produces very ugly trees.