SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files
                       Flea v 0.2
             the Ruby Fractal Life Engine
              GNU General Public License

             Copyright (C) 2001 by Phlip
               eMail: phlip_cpp@yahoo.com
                   17 November 2001

          http://sourceforge.net/projects/flea
     http://www.rubygarden.com/ruby?FractalLifeEngine
              http://flea.sourceforge.net

Feel free to e-mail me if I can help anyone start using this.

Dependencies (in order from strict to optional):

        GNU tools
        g++ 2.96
        x-povray 3.1, from http://www.povray.org
        Ruby 1.6.5
        lapidary-0.2.1.tar.gz
        ImageMagick
        YASRT v01 beta 12

I don't expect major hassles over minor deviations from the version ticks listed; I certainly do not depend on any bleeding-edge ability of any of those packages.

The legacy system will only drop-dead without the first three. The new system needs Ruby, of course, but ImageMagick is only to display the result; edit the fuctions called "render" to pick a new viewer.

This file ends with a "Quick Start" do-list.

The orginal LPARSER stuff is ported to C-style C++, but with all output formats except POVray snipped out. Read Makefile (it's not a tangled blob), the FILELIST, and http://www.xs4all.nl/~ljlapre/ to learn to grow life in the original LPARSER4 format on a GNUstyle platform.

This project is entirely test-first, so I can't open the CVS to anonymous check-in. Sorry. Test-first vs Free Software is an unexplored territory, and I'l let those good at exploring go there first.

But test-first takes priority. Those who think of something to add are free to e-mail it to me privately at phlip_cpp@yahoo.com & I'l pop it in.

######## Super Quick Linux Start ########

make

This assumes everything on the shopping list up to ImageMagick.

######## Quick Start ########

This warms up the GNU port of the legacy code:

  • install g++, ruby, rubyunit, povray & ImageMagick make lparser translate ./grow.sh lobster && ./render.sh lobster
  • edit render.pov to improve the camera angle ./render.sh lobster

If at first the camera can't see anything, edit render.pov & turn on panoramic. This sees everything in a quadrant.

To prove the new Ruby system works, edit fleaConfig.rb if your POVray is not x-povray, and slam dunk this:

ruby fleaCore_.rb

That generates dozens of invisible scripts, compares them to LPARSER's take on the same axiom sets, and counts the number that failed. Because I only commit after seeing an All Tests Passed here, I would be very interested to hear of any lapse.

Finally, to render a bran' new .flea script instead of an old .ls script, enter this:

./fleaPOV samples/fir.flea

If all the above requirements are installed, you should eventually see a tree.

To learn to write .flea files, read an LPARSER tutorial on the 'net, then read the top of the file called "flea". This presents a translation table from the old system to the new one. Then inspect a .flea file to learn its simple structure. And, of course, don't start a new .flea from scratch - copy one similar to what you need and then start making minor tweaks to it. And set the .ini settings to a small file size and a low-quality render, so you can iterate your results quickly.

Observe that the only parser in the system is Ruby itself. .flea files are snips of Ruby code that ./flea evaluates in a context that provides it the base classes and support functions. This means one can write simple scripts that match what LPARSER could do (without learning almost any Ruby), or one can use Ruby variables, libraries & control-flow statements.

Read the directory ./samples, the top of fleaPOV, and the legacy LPARSER documentation to learn how L-systems work.

Thanks for playing!

--Phlip

pplumlee@celterra.com

http://www.greencheese.org/Phlip


Sponsored Links

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.