Deliantra MORPG |
Last change: 2008-11-06
// // some fantasy flower // include (simple_leaf) include (simple_petal) fig(n) => tree(5), n; tree(n) : n => attr (color, '0.2 0.8 0) attr (width, 2) F(8) L /(137.5) tree(n-1); tree(n) => F(10) attr (color, '1 1 0) attr (distance, 5) /(9) petal (10, 8); L => [attr (width, 1) &(30) simple_leaf (30, 30) ^(15) F(15) attr (distance, 4) petal (80, 3)];
This is not too long, given the nice-looking result, no? Granted, it "only" defines the skeleton of the plant (the leaf and petal shapes are defined elsewhere), but it does specify growth, color and shape.
The current version is highly alpha - there is NO documentation whatsoever included in the distribution. Your only source of documentation at the moment is this page. I'm afraid that there are many, many portability problems in this version. If you can, please check it out and send me some bug-reports.
Next build it by entering make. Do not enter make install, as that doesn't do much useful at the moment.
You should be able to get some output by entering lsys -Ilib lib/capsella_bursa_pastoris.l 15. If you do not have opengl/mesagl support compiled in (that really is a must) you can force boring postscript output by specifying lsys -Ilib lib/capsella_bursa_pastoris.l 15 15 -o lsys.ps -f ps.
If you encounter any problems ;) Or have any questions ;) Then don't hesitate to send me an email!
FRACTINT L-systems tutorial
L-Systems Links (including tutorials)
L-systems Software
Visual Models of Morphogenesis: A Guided Tour
# this ruleset is not really necessary, but it improves efficiency ruleset ( T => F+F+F+F; ) define angle deg(acos(1/3)); tet_koch(n) => attr (delta, 120) +[\(angle)T]f +[\(angle)T]f +[\(angle)T]f ,n-1; T => [attr(distance,distance*0.5) attr(color,'1 0 0) F[+(60)\(angle)T]F+ attr(color,'0 1 0) F[+(60)\(angle)T]F+ attr(color,'0 0 1) F[+(60)\(angle)T]F ];
Any questions/hints/critics? Contact the author of this page!