lsys

Lsys runs Fractint L-Systems. It's currently in "prototype" state.

See fractint.doc for more info on L-Systems in general, and the Fractint implementation thereof.

Current Status

This is a limited reimplementation. I currently only implement the commands "f", "+", "-", "[", and "]". I currently support PostScript and HPGL output devices.

A surprising number of the fractals in fractint.l work with just f, +, and -:

koch1 koch2 koch3 koch6 dragon peano1 flowsnake quartet sierpinski1 koch4 hilbert peano3 koch5 sierpinski2 sierpinskisquare quadkoch fass1 fass2 quadgosper curve1 curve2 curve3 curve4 colortrianggasket (but no color!) dragoncurve square kochcurve

I have tried all of them. They all make interesting pictures; this is not a guarantee that they are running correctly, though. :)

These formulas (all of which I have tested; they make interesting pictures) use [ and ] as well:

sierpinski3 plant01 plant02 plant03 plant04 plant05 plant06 plant07 plant08 plant09 plant10 plant11 bush (same as plant03) mytree penrose1 penrose2 penrose3 penrose4 doublepenrose circulartile colorpenrose1 (but no color yet for colorpenrose1)

(Total: 48 working formulae)

These don't look like they should work yet, though:

cesaro doublecesaro cantordust snowflake2 snowflakecolor island1 island2 snowflake1 snowflake3 tree1 peano2 pentagram bush mytree sphinx pentaplexity

(Total: 16 nonworking formulae)

Behavior and Usage

lsys will look for the formula (dragon by default) in whatever lsystem file it finds first. First it will look for /dos/fractint/fractint.l, which happens to be where fractint.l is installed on my system; then it will look for fractint.l in the local directory. This behavior can be overridden with the -lfile option.

You run lsys like this:

lsys [-order n] [-ps] [-dumplines] [-lfile filename] [-formula formname] [-debug]

`-order n' says to apply the transformation rules n times (default is 3).

`-ps' says to produce PostScript output (HPGL is the default).

`-dumplines' says to output a list of all the lines plotted in abstract coordinate space before doing the physical plotting.

`-lfile filename' means to use filename instead of fractint.l or /dos/fractint/fractint.l.

`-formula formname' means to use the formula labeled 'formname' (case-insensitively.)

While lsys is running, it will output occasional status messages to stderr indicating how long each stage of the computation took and how much output it generated.

`-debug' will enable further reporting.

This program uses a lot of memory, is slow, and generates voluminous output. That's because it's a prototype and because it's written in Perl.

URLS

You can download lsys from http://www.pobox.com/~kragen/sw/lsys.

This document lives at http://www.pobox.com/~kragen/sw/lsys.html.