\ test l-system
\ plant generator.  This is an attempt at an evolutionary or
\ developmental model...

n = 18
delta = 30.0
initial = A

X0 = 320.0
Y0 = 10.0
size = 5.0

macros
L = -F+FFF+F++++F+FFF+F                       \ define a "leaf" pattern
X = --F++F[++++F]++F[++++F]++F[++++F]++F++F   \ define a "flower" pattern
endm

rules

A = FFFFFBX    \ A evolves to a stem, a part 'B' and a flower
B = CFF        \ B evolves to a stem (it "grows") and part 'C'
C = DFF        \ etc
D = EFF        \ etc
E = [+FFA][--G][++G][-FFA]     \ E evolves into branching and part 'G'
G = FFL                      \ G evolves into a stem and a leaf

endrules
end
