in reply to Re: 1-D Cellular Automata
in thread 1-D Cellular Automata
Unfortunately, since then, I haven't found any good turtle-graphics style module to support interesting L-system output. There was (is?) a Graphics::Turtle module (or something similar) in CPAN, but according to the author it was an idea, not an implementation.
However, using postscript for turtle graphics output is pretty easy, if you don't mind using a postscript viewer to look at the output. Instead of rotating your "turtle" and calculating a new (X, Y) based on your angle and a fixed radius, translate your current position to (0, 0), rotate the world around the origin, and then draw a line to (say) (0, 1). Using postscript as my output device, the snowflake generator was under 4 80-character lines long, including unnecessary obfuscation and without any external module dependancies.
I hope this provides some inspiration :) If I don't find my old postscript L-system generator maybe I'll rewrite it and post it here somewhere.
Alan
|
---|
Replies are listed 'Best First'. | |
---|---|
Re(2): 1-D Cellular Automata
by gumby (Scribe) on Jun 21, 2002 at 18:50 UTC |