[comp.graphics] Plant generator program available

leech@homer.cs.unc.edu (10/13/90)

    The following README file describes the first release of a program
to generate plant and fractal models, based on the "Algorithmic Beauty
of Plants" book discussed previously in comp.graphics.  The code is
available by anonymous ftp in:

    dopey.cs.unc.edu[128.109.136.82]:~ftp/pub/lsys.tar.Z
    iuvax.cs.indiana.edu[129.79.254.192]:~ftp/pub/alife/public/lsys.tar.Z

    Dopey has a flaky net connection, so I recommend trying iuvax
first.

-----------------------------------------------------------------------------
	    RELEASE NOTES FOR LSYS - October 12, 1990

    INTRODUCTION

    This is an early release of lsys, a program to generate complex
models using L-Systems.  Only graphics/C++ hackers should be using
this code at present.  The program was inspired by the Springer-Verlag
text _The Virtual Laboratory: The Algorithmic Beauty of Plants_, by P.
Prusinkiewicz and A.  Lindenmayer, and maintains as much compatibility
with their input format as I could manage.

    Documentation for the program is found in lsys.l in [nt]roff form
(process with the -man macros), and in lsys.cat in lineprinter form.
The book will be needed to make use of the program, as many semantic
issues are not documented in the (rather terse) man page.

    PORTING

    The code has been compiled and tested using AT&T C++ 2.0 on
DECstation 3100s and Sun C++ 2.0 on Sun-4s.  It should port easily to
AT&T C++ running on other platforms, possibly by simply recompiling.
However, the parser is written in yacc and the generated y.tab.c
compiled with C++.  Since the output of yacc is usually K&R-style C,
some knowledge of yacc internals is needed to provide prototypes.
Fortunately, this can be accomplished by working with the source
produced by yacc and the error messages (if any) from compiling it.

    Some versions of malloc() allow more efficient allocation of small
blocks by the call mallopt(M_MXFAST, maxblocksize).  If M_MXFAST is
defined by the <malloc.h> header file, lsys will attempt to use it.
It may be necessary to link an additional library to obtain this
version of malloc; for example, on DECstations running Ultrix, the
-lmalloc library must be used.	The make variable LIBS may be set to
specify this library, either by editing the Makefile (preferred) or by
command-line options to make, e.g.

    % make		    # SunOS
    % make LIBS=-lmalloc    # Ultrix

    lsys uses C++ 2.0 features such as pure virtual member functions,
static initialization of scalars with functions, const member
functions, and the iostream library, which means it will be tedious to
port back to earlier versions of C++.  Anyone wishing to port the code
to the GNU tools should contact me by email first, so the work doesn't
end up being done several times.

    NEW OUTPUT FORMATS

    Currently, PostScript and a 'generic' output format may be
generated.  It should be straightforward to add new output formats for
ray-tracers and such by subclassing class DBGenerator, an abstract
output class.  See README.OUTPUT, DBGenerator.[ch], and
GenericGenerator.[ch].	Please send any output generators for
widely-used formats (e.g.  NFF) to me for inclusion in the
distribution.

    EXAMPLES

    Examples drawn from the text are provided in the subdirectory
'Examples' (see README.EXAMPLES), and may be examined to gain
familiarity with the input format.  With few exceptions (see BUGS in
the man page), these produce images and databases very close to those
in the book.

    BUGS

    Please contact me via email with bug reports (accompanied by
L-systems causing them), interesting L-systems for inclusion in the
release, enhancements, and suggestions.

    Jon Leech (leech@cs.unc.edu)
    __@/
--
    Jon Leech (leech@cs.unc.edu)    __@/
    ``There ain't hardly nothin' cuter nor a sleepin' baby tad
      lessen it's a pork chop'' - Churchy La Femme

leech@degas.cs.unc.edu (Jonathan Leech) (10/17/90)

In article <16746@thorin.cs.unc.edu> I wrote:
>    The following README file describes the first release of a program
>to generate plant and fractal models, based on the "Algorithmic Beauty
>of Plants" book discussed previously in comp.graphics.  The code is
>available by anonymous ftp in:
>
>    dopey.cs.unc.edu[128.109.136.82]:~ftp/pub/lsys.tar.Z
>    iuvax.cs.indiana.edu[129.79.254.192]:~ftp/pub/alife/public/lsys.tar.Z
					  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Make that ~ftp/pub/alife/software/unix/Lsys/lsys.tar.Z on iuvax;
the folks there moved the program.  Sorry for the confusion.
lsys.tar.Z is a compressed tar archive, in case that wasn't clear.
--
    Jon Leech (leech@cs.unc.edu)    __@/
    ``Those what cannot remedy the past can pretend to repeal it."
	- Attributed to Santa Ana by Howland Owl