Gnome Turtle
------------

  Written by: Mathieu Lutfy <mathieu@bidon.ca>
  Copyright: See "COPYING" file.
  Website: https://savannah.nongnu.org/projects/gnome-turtle/

Gnome Turtle (gnome-turtle) draws fractals from L-Systems in the
GNOME 2 environment. It is intended to be a pseudo-academic and 
entertaining program to learn how to draw fractals with L-Systems.

- Why?

I was reading a book called "The Computational Beauty of Nature" by
Gary William Flake, when I stumbled apon the chapter on how to draw
fractals with L-Systems (based on Noam Chomsky's formal languages).

I couldn't find the "lsys" program that was refered to in the book,
so I decided to write one for the Gnome 2 environment. The program
was written fairly quickly, and hence you may find a few strange 
things in the code, such as how flex/bison is used.

- Examples?

Look in the "examples" directory. Not all of them work, and others 
you may need to adapt to your environment, as this program has not 
been heavily tested.

I found this fairly good random site from a search engine:
http://spanky.triumf.ca/www/fractint/lsys/tutor.html

.. altough they don't use the same syntax as mine :-)

- Contributing code / examples

You're most welcomed to do so. Just e-mail me: mathieu@bidon.ca with
a diff and explanation of what it does. Try to keep with the coding
standards I've used (Gnome-ish) and send only a small diff. Keep in
mind that if your diff is too big and I cannot easily understand it,
I will not feel like applying it.

- About the code ..

I'm not very familiar with GNOME, so I took a look at the "gnibbles"
program from gnome-games, and copied the basic interface. The code
change quite alot since, but you may still finds off-topic relics in
the code.

I'm a very lazy person and I used flex/bison only to validate the 
input. I had to hack a bit to get the flex/bison input files 
(turtle-parser.{l,y}) into the "autogen" system, but it seems to
work now.

The input is therefore first validated, then recursively drawn on the
screen. The drawing is not particularly fault tolerant at the moment
and heavy recursivity can eat alot of memory because each "point" is
kept in memory in order to be later erased. Of course, pure xlib
coding would perhaps been more appropriate, but I didn't have much
time and Gnome made it very easy to implement.

- Building the code

macros/ were taken from another package, since it wasn't very clear
how they were supposed to land there and allow autogen to work.
I also did a "cp /usr/share/automake/* ." to get the usual files.

To build the code from CVS, just run:

$ sh my_autogen.sh
$ make

For reference, I wrote the code on Debian GNU/Linux, powerpc using 
GCC version 3.3.3.

Happy hacking!

