----------------------------------------------------------------------
Install
----------------------------------------------------------------------
Load, compile and save your image:
"load.factor" run-file save
----------------------------------------------------------------------
Usage
----------------------------------------------------------------------
USE: lindenmayer setup-window
Towards the end of the "lindenmayer.factor" file, there are words for
various L-systems. Let's pick abop-1, which is an example from the
book The Algorithmic Beauty of Plants
abop-1
Look at the axiom
axiom get .
And the productions
rules get .
The string to be interpreted is stored in the result variable. Start
off by calling init to copy the axiom to result
init
Look at result
result get .
It's just the axiom. Now iterate the string
iterate
You should see a branch and a leaf. Look at the result again:
result get .
Call iterate as many times as you want. :-) After about 4 iterations
the tree starts to grow beyond the edge of the window. Change the
point that the camera is looking at:
{ 0 0 3 } camera-focus set-global display
You can also change where the camera is located:
{ 0 0 10 } camera-position set-global display
Happy gardening
----------------------------------------------------------------------
See also
----------------------------------------------------------------------
The Algorithmic Beauty of Plants
by Przemyslaw Prusinkiewicz and Aristid Lindenmayer
Available online: http://algorithmicbotany.org/papers/abop/abop.pdf
The Computational Beauty of Nature
Gary William Flake
Algorithmic Botany at the University of Calgary
http://algorithmicbotany.org/
Laurens Lapre's Lparser
http://home.wanadoo.nl/laurens.lapre/lparser.html