From: khattra@cs.sfu.ca (Taj Khattra)
Subject: Re: Fractal Plants (LONG)
Organization: CSS, Simon Fraser University, Burnaby, B.C., Canada
Date: Tue, 6 Oct 1992 22:03:10 GMT

In article <1asfr1INNanb@function.mps.ohio-state.edu> edgar@function.mps.ohio-state.edu (Gerald Edgar) writes:
>In article <1992Oct6.145938.13031@aio.jsc.nasa.gov> walker@superboy.jsc.nasa.gov writes:
>>I am interested in generating fractal landscapes.  I have found the
>>mountain generating code but I need to also generate plants, trees and
>>shrubs.
>
>Try:
>The Algorithmic Beauty of Plants, by Prusinkiewicz & Lindanmayer.
>
>-- 
>  Gerald A. Edgar                Internet:  edgar@mps.ohio-state.edu
>  Department of Mathematics      Bitnet:    EDGAR@OHSTPY
>  The Ohio State University      telephone: 614-292-0395 (Office)
>  Columbus, OH 43210             -292-4975 (Math. Dept.) -292-1479 (Dept. Fax)


(cross-posted to sci.fractals for others interested in L-systems)


Also check out the appendix of "Lindenmayer systems, Fractals, 
and Plants" by Prusinkiewicz, P and Hanan, J (Springer-Verlag 1989).
It contains some C code to draw simple 2-dimensional L-systems.
(The Algorithmic Beauty of Plants is actually a much improved 
rewrite of the above book, but it doesn't contain any code).

There is also a nice section on 2-dimensional L-systems in "The
Science of Fractal Images" (also contains code).

If you're looking for software, here's an article that was posted to 
alt.fractals some time last year (apologies to the original poster
Gerrit ? for due credit).


      ***********************************************************************
      This is a summary of the replies to the L-systems software survey that was
      posted to Frac-L and alt.fractals at the beginning of September 1991. 
      The software described in the replies has been grouped in three categories 
      according to the machines that the software runs on: Macintosh, IBM-PC, 
      and Unix machines. The software described ranges from programs still under 
      development to complete commercial packages.
      
      Here is a copy of the original survey:  
      -----------------------------------------------------------------------------
      L-Systems Survey
      
      The purpose of this survey is to locate the L-systems software that is
      currently available. If you have written, are using, or know about 
      L-systems software, please let me know. When describing a given program
      it would be helpful to have information on the following points wherever
      possible.
      
       1. Name. Name of the program.
       2. Author. Name, address, and e-mail address.
       3. Availability. Available by ftp? where? site and path.
       4. Language. Is it written in BASIC, Pascal, C, etc? which version?
       5. Platform. What machines does it run on? Mac, PC, DECstation, etc.
       6. Operating system. MacOS, MS-DOS, UNIX, etc.
       7. Code. Is a compiled version available? Is the source code available?
       8. User interface. How does user the interact with the program? Are there 
          prompts, or dialogs and menus, or does one have to alter the code?
       9. Capability. What kinds of L-systems can the program do? e.g., bracketed,
          context-sensitive, stochastic, parametric, 3-D.
      10. Applications. How has the program been used? References?
      11. Comments. Anything not covered above.
      
      The results of this survey will be summarized and sent to all who respond. 
      Thank you for your help.
      
      John Corbit  <corbit@essex.stfx.ca>
      -----------------------------------------------------------------------------
      First here is a brief overview of the software. For each category 
      (Mac, PC, and Unix) the software is identified by author, program name, 
      language, and e-mail address:
      
      MACINTOSH:
      
        1. Paul D. Bourke
             'L-System' & '3D L-System', C
               pdbourke@ccu1.aukuni.ac.nz
      
        2. Przemyslaw Prusinkiewicz
             'pfg2D', C
               pwp@cpsc.ucalgary.ca
      
      IBM-PC:
      
        1. Arnd Burghardt <INABU@DCZTU1>
             'l-sys.exe', TurboPascal (menus in German) 
               inabu@DCZTU2.bitnet
               inabu@ibm.rz.tu-clausthal.de
      
        2. Deren Hansen 
             '0level.c', '0level2.c', '0level3.c', QuickC         roots and fungi
               dhansen@nmsu.edu
      
        3. Ton Hospel
             '0LFRAC', C
               GUTEST2@BLEKUL11.BITNET
               stud05@cc4.kuleuven.ac.be
      
        4. Adrian Mariano 
             'Fractint',  C
               adrian@milton.u.washington.edu
      
      UNIX MACHINES:
      
        1. Jonathan Leech
             'lsys', C++, capable of parametric L-systems
               leech@cs.unc.edu
      
        2. Living Systems Incorporated
             'pfg3D' and 'pfg3D - parametric', C, SG Personal Iris
               jim@cs.uregina.ca or pwp@cpsc.ucalgary.ca
      
        3. Gerrit Polder
             based on 'pfg', C, SUN OS, interface in progress
               POLDER@CRZ.AGRO.NL
      -----------------------------------------------------------------------------
      -----------------------------------------------------------------------------
      Now here are the actual replies from each author, grouped by machine:
      -----------------------------------------------------------------------------
      
      MACINTOSH:
      
      Macintosh 1 from Paul Bourke:
      -----------------------------------------------------------------------------
       1. Name of the program.
      L-System
      
       2. Author. Name, address, and e-mail address.
      See signature at the bottom of this note
      
       3. Availability. available by ftp? where? site and path.
      bode.ee.ualberta.ca
      sumex-aim.stanford.edu
      ccu1.aukuni.ac.nz (130.216.1.5)
      
       4. Language. Is it written in BASIC, Pascal, C, etc? which version?
      Think C (4.0) for the Macintosh
      
       5. Code. Is it compiled or is it source code? What compiler is required?
      Application available as shareware, source available on request for $$
      
       6. Platform. What machine does it run on? Mac, PC, DECstation, etc.
      Mac family
      
       7. Operating system. MacOS 6.xx, 7.0, MS-DOS, Ultrix, etc.
      Mac OS
      
       8. User interface. this varies from none to complete menu driven interface.
      Standard Macintosh interface
      
       9. Capability. What kinds of L-systems can the program do? e.g., bracketed,
          context-sensitive, stochastic, parametric, 3-D.
      
      2D, 0L, bracketed, context sensitive, stochastic.
      
      10. Applications. How has the program been used? References?
      Intellimation distribution.
      
      -----------------------------------------------------------------------------
      
       1. Name of the program.
      3D L-System
      
       2. Author. Name, address, and e-mail address.
      See the signature at the bottom of this note.
      
       3. Availability. available by ftp? where? site and path.
      ccu1.aukuni.ac.nz (130.216.1.5)
      
       4. Language. Is it written in BASIC, Pascal, C, etc? which version?
      Think C (4.0) for the Macintosh
      
       5. Code. Is it compiled or is it source code? What compiler is required?
      Application available as shareware, source on request for $$
      
       6. Platform. What machine does it run on? Mac, PC, DECstation, etc.
      Macintosh II family
      
       7. Operating system. MacOS 6.xx, 7.0, MS-DOS, Ultrix, etc.
      Mac OS
      
       8. User interface. this varies from none to complete menu driven interface.
      Standard Macintosh interface
      
       9. Capability. What kinds of L-systems can the program do? e.g., bracketed,
          context-sensitive, stochastic, parametric, 3-D.
      3D, 0L, bracketed
      
      10. Applications. How has the program been used? References?
      New, ??
      ------------------------------
      
      Paul D. Bourke
      pdbourke@ccu1.aukuni.ac.nz
               (130.216.1.5)
      
      School of Architecture
      Auckland University
      Private Bag
      Auckland
      New Zealand
      
      Ph:  +64 9 737 999 x7367
      Fax: +64 9 366 4665
      -----------------------------------------------------------------------------
      Macintosh 2 from Przemyslaw Prusinkiewicz:
      -----------------------------------------------------------------------------
      
       1. Name. pfg2D
       2. Author. Przemyslaw Prusinkiewicz,
                  University of Calgary
                  Calgary, Alberta
                  Canada
                  pwp@cpsc.ucalgary.ca
       3. Availability. Available by anonymous ftp from
                      hercules.cs.uregina.ca in pub/pfg in tar and hqx format
       4. Language. Written in C.
              Aztec C68K compiler Version 3.4b.
       5. Platform. Macintosh
       6. Operating system. Macintosh
       7. Code. Includes source code.
       8. User interface. The user edits L-system data files which are read
          by the program.
       9. Capability.
          Pfg2D produces black and white images of two-dimensional structures
          specified by L-systems  with turtle interpretation.  The program
          supports bracketed L-systems with no context, one-sided context and
          two-sided context.
      10. References.
          A background explanation and listing of this code is included in the book
              "Lindenmayer systems, fractals, and plants"
              Prusinkiewicz and Hanan, Springer-Verlag 1989.
      11. Includes sample data files
      -----------------------------------------------------------------------------
      -----------------------------------------------------------------------------
      IBM-PC:
      
      IBM-PC 1 by Arnd Burghardt
      -----------------------------------------------------------------------------
      
      > 1. Name. Name of the program.
           l-sys.exe in archive l-system.zip
      
      > 2. Author. Name, address, and e-mail address.
           Me, myself and I, so:
           Arnd Burghardt
           An der Tillyschanze 4
           W-3392 Clausthal-Zellerfeld
           Germany
           inabu@DCZTU2.bitnet
           inabu@ibm.rz.tu-clausthal.de
      
      > 3. Availability. Available by ftp? where? site and path.
           Yes, it should be on:
           sun.rz.tu-clausthal.de (139.174.1.3) anonymous ftp
           in path pub/msdos/sources as l-system.zip
      
      > 4. Language. Is it written in BASIC, Pascal, C, etc? which version?
           It is written in TurboPascal Ver. 5.5 (no oop).
           (But it'a german program with menue, variable-names and
           function/procedure names in G E R M A N (if you can understand it - ok)
      
      > 5. Platform. What machines does it run on? Mac, PC, DECstation, etc.
           It's made for the PC (8086 and up), of course it is pascal, but
           TurboPascal is a special 'slang', so it will be hard to convert it
           to other maschines (especially the graphics will be different).
      
      > 6. Operating system. MacOS, MS-DOS, UNIX, etc.
           I tested many MS-DOS, IBM-DOS, DR-DOS versions, if the operating-system
           is MS-DOS compatibel, it works fine...
      
      > 7. Code. Is a compiled version available? Is the source code available?
           The zip-archive contains then compiled version l-sys.exe as well as
           the complete source-code.
      
      > 8. User interface. How does user the interact with the program? Are there
      >    prompts, or dialogs and menus, or does one have to alter the code?
           The l-system-language is really fractint-like, but I tried to produce
           something easier to handle. The l-systems are - like fractint - in a
           special file, that can be edited with an editor, the l-system-
           interpreter has an own interactive editor built in. If the user knows
           only a little bit german, it will take no problems to user it.
      
      > 9. Capability. What kinds of L-systems can the program do? e.g., bracketed,
      >    context-sensitive, stochastic, parametric, 3-D.
           Again, nearly fractint compatible so only context-free. The using of
           variables may simulate a (small) context.
      
      >10. Applications. How has the program been used? References?
           The programm stands for itself, no configuration, no other file, exept
           the l-system-data-file is needed, everything is detected by itself.
           A little utility vgatonec.exe is given as gift, for those people having
           a VGA monitor an a NEC DotPrinter to save the nice Pictures on paper.
           The frame describtion is given as softprak.ps but it is written in (again)
           german and the pictures an listing are not included.
      
      >11. Comments. Anything not covered above.
           The Programming intension was a part of my studies in informatics so I
           did it not for fun. It is no dirty, heavy, fast code, but in opposite
           a trial to make a very beauty, good readibal and non tricky program,
           because there will come up to three to four other guys to pump the
           program up.
      -----------------------------------------------------------------------------
      IBM-PC 2 by Deren Hansen
      -----------------------------------------------------------------------------
      
      Name: 0level.c, 0level2.c, 0level3.c
      Author: Originally published as an article with accompanying source
              by Hardin Brothers in PC Resource magazine, in one of the
              fall 1989 issues (I believe)
              Modified and customized by Deren Hansen,
                      address: NMSU-EPPWS, Box 30001 Dept. 3BE
                               Las Cruces, New Mexico USA 88001
                      email:   dhansen@nmsu.edu
      Availability: Not yet available for ftp.  Could easily be arranged
                      with sufficient interest.  Available by email to
                      dhansen@nmsu.edu
      Language: QuickC
      Platform: MS-DOS
      Code    : Compiled and source available.  Original available form
                PC Resource magazine bulletin board.
      User Interface: Numbered Menu
      Capability: Fairly vanilla implementation of basic L-system functionality
              2-D only.
      Applications: Modified and customized to produce L-system based models
              of roots and fungi as part of our research program.
      Comments: While short on 'bells and whistles' the small size of the code
              easily lends itself to modification.
      -----------------------------------------------------------------------------
      IBM-PC 3 by Ton Hospel
      -----------------------------------------------------------------------------
      
       1. Name.          0LFRAC
       2. Author.        Ton Hospel (GUTEST2@BLEKUL11.BITNET,
                                     stud05@cc4.kuleuven.ac.be)
      
       3. Availability.  Available on LISTSERV (LISTSERV@BLEKUL11,
                         in the C-CHEST filelist
       4. Language.      written in ANSI C
       5. Platform.      VM/CMS, PC (I had versions for Amiga and UNIX, but never made
       6. Operating system. VM/CMS,MS-DOS
       7. Code.          available, but for the VM version a bit perverted.
       8. User interface. System descriptions in a file. Start the program with a
                         certain file as target.
       9. Capability.     Only 0L systems
      10. Applications.   Nope.
      11. Comments.       Very raw version, but quite fast. Does autoscaling
      -----------------------------------------------------------------------------
      IBM-PC 4 by Adrian Mariano
      -----------------------------------------------------------------------------
      
      >From: Adrian Mariano <adrian@milton.u.washington.edu>
      Message-ID: <9109040213.AA05451@milton.u.washington.edu>
      To: corbit@essex.stfx.ca
      Subject: L-System software
      
      1. Name: Fractint
      2. Authors: many, but I am the one responsible for the L-system code.
      3. Availability:  all over the place:  wuarchive.wustl.edu in
         mirrors/msdos/graphics is one site.
      4. Written in C
      5. Runs on a IBM compatible PC
      6. MSDOS (There is a windows version of fractint, but I don't know if the
                L-System code is included or not)
      7. Compiled version and source are both available
      8. User interface is through dialogs (I guess) and through editing the
         l-system file with your editor
      9. Capability.  Doesn't do context-sensative, stochastic, 3-d, or parametric.
         (I wrote this without having read the definitive l-system works.)
      10.  ???
      11.
      -----------------------------------------------------------------------------
      -----------------------------------------------------------------------------
      UNIX MACHINES:
      
      UNIX 1 by Jonathan Leech
      -----------------------------------------------------------------------------
      
      >  1. Name. Name of the program.
      
          'lsys' (catchy, eh?)
      
      >  2. Author. Name, address, and e-mail address.
      
          Jon Leech
          CB #3175 UNC-CH
          Chapel Hill, NC 27599-3175
          USA
          (919)-962-1814
          leech@cs.unc.edu
      
      >  3. Availability. Available by ftp? where? site and path.
      
          ANONYMOUS ftp from ftp.cs.unc.edu in pub/lsys.tar.Z (compressed
          Unix tar archive).
      
      >  4. Language. Is it written in BASIC, Pascal, C, etc? which version?
      
          C++.  AT&T C++ 2.0 or G++ 1.39.0 or later versions are known to
          work; other compilers compatible with AT&T C++ 2.0 should work.
      
      >  5. Platform. What machines does it run on? Mac, PC, DECstation, etc.
      
          Should run on any Unix system; I test on Sun-4s and DECstations.
          I ported a version to run under Apple's MPW on Macs, but am unable
          to maintain it at present.  Should be easy to port to MS-DOS given
          a suitable compiler.
      
      >  6. Operating system. MacOS, MS-DOS, UNIX, etc.
      
          UNIX: SunOS 4.1, Ultrix 4.2, and other current versions.
          Mac: System 7 with MPW.
      
      >  7. Code. Is a compiled version available? Is the source code available?
      
          Supplied in source only.  I can make binaries for Sun-4s and
          DECstations available if needed.
      
      >  8. User interface. How does user the interact with the program? Are there
      >     prompts, or dialogs and menus, or does one have to alter the code?
      
          Command line driven, can also imbed options (# generations, turn
          angle, etc.)  in the input grammars.
      
      >  9. Capability. What kinds of L-systems can the program do? e.g., bracketed,
      >     context-sensitive, stochastic, parametric, 3-D.
      
          All of the above.  Supports all examples in the "Algorithmic
          Beauty of Plants" book through chapter 5; does not support timed
          or map L-systems (chapters 6 and 7) yet.
      
      > 10. Applications. How has the program been used? References?
      
          I use it to generate databases for our high-end custom graphics
          system, Pixel-Planes, and others are using it for database
          generation for ray tracers.  At least two people are doing
          biological modelling.  Another is using it in support of a thesis
          project in simulating paintbrush strokes.  No printed references.
      
      > 11. Comments. Anything not covered above.
      -----------------------------------------------------------------------------
      UNIX 2 by Living Systems Incorporated
      -----------------------------------------------------------------------------
      
       1. Name. pfg3D
       2. Author. Living Systems Incorporated
                  2335 Osler Street
                  Regina, Saskatchewan
                  Canada S4P 1X2
                  jim@cs.uregina.ca or pwp@cpsc.ucalgary.ca
      
       3. Availability. Available from Living Systems for $500 plus taxes.
       4. Language. C
       5. Platform. Silicon Graphics Personal Iris
       6. Operating system. UNIX.
       7. Code. Includes source code.
       8. User interface. The user edits L-system data files which are read
          by the program.
       9. Capability. The program produces full-color images of three-dimensional
          structures derived from stochastic bracketed L-systems with context.
          Bezier surfaces can be incorporated.
      10. References. "Plantworks: A software system for realistic plant
          modelling" Masters Thesis, Jim Hanan, University of Regina, 1988.
      11. Comments. Includes a library of examples.
          A version which produces postscript and rayshade output is also 
          available.
      
       1. Name. pfg3D - parametric
       2. Author. Living Systems Incorporated
                  2335 Osler Street
                  Regina, Saskatchewan
                  Canada S4P 1X2
                  jim@cs.uregina.ca or pwp@cpsc.ucalgary.ca
      
       3. Availability. Available from Living Systems for $500 plus taxes.
       4. Language. C
       5. Platform. Silicon Graphics Personal Iris
       6. Operating system. UNIX.
       7. Code. Compiled version only.
       8. User interface. The user edits L-system data files which are read
          by the program.
       9. Capability. The program produces full-color images of three-dimensional
          structures derived from stochastic parametric L-systems with context.
          Bezier surfaces can be incorporated.
      10. References. "The Algorithmic Beauty of Plants" Prusinkiewicz, Lindenmayer
          et al, Springer-Verlag 1990.
      11. Comments. This program makes it possible to implement all the examples
          presented in the book.  Includes a library of examples.
          A version which produces postscript and rayshade output is also available.
      -----------------------------------------------------------------------------
      UNIX 3 by Gerrit Polder
      -----------------------------------------------------------------------------
      
      Question:       Answer:
      1. Name         PFG, Plant and fractal generator
      2. Author       Prusinkiewicz, published a MAC version in
                      Lecture Notes in Biomathematics 79, 1989.
                      I am busy to convert it to SUN, Xview.
      3. Avail.       MAC source code in ^ , My SUN code if it is
                      ready, ?????. (Depends on several things here)
      4. Language     C
      5. Platform     SUN Sparcstation IPC
      6. OS           SUN OS, (UNIX)
      7. Code         ?
      8. User int.    I'm busy to make a X-Windows (Openwindows)
                      application with menu's, buttos, sliders,
                      etc. etc.
                      It uses a source file with the l-system, it has
                      also a file with the lookuptable.
      9. Capability.  up till now, bracketed, context-sensitive.
                      I'm planning to expand it with line-width, color-
                      increment, filled polygons, edges, etc.
      10. Appl.       We plan to use L-Systems to describe plant
                      varietys, for plant breeding law, and to forecast
                      morphology of addult plants from the young stadia.
                      and use it as a model for morphological studies.
      11. Comments    the basic program works now, at the moment I'm
                      busy to implement the user interface, after that
                      I go implement new extensions.
      
      With kindly regards,
                      Gerrit.
      ***********************************************************************


Regards
--
Taj Khattra
khattra@cs.sfu.ca