Page 1 of 1

Simple L-System Demo

Posted: Sat Jul 22, 2006 4:42 am
by agrif
I've been playing around with procedural textures for a bit and came up with a small program to tweak the settings of an L-System fractal (tree type stuff...) It looked kinda useful so I cleaned it up and decided to share it. This could be really neat for people who like fractals...

Image

The zip (precompiled windows with source for others) can be found here:
http://projectfaint.hopto.org/~agrif/lsystem.zip

Sorry, no makefile for *nix guys. I just figured, with 1 file and 1 lib, you could figure it out yourselves... :roll:

This demo doesn't render to a texture, but it wouldn't be hard at all. For those interested, I seperated the LSystem class with the rest of the code with huge, blaring comments.

A teedy bit on L-System, and some examples:
http://www.biologie.uni-hamburg.de/b-on ... /lsys.html
It's a little cryptic, but it's the best I've found on the net.

When you start it up, press the "H" button next to the fields to see what they are!

Try this setup out:
1) F
2) F=F[+F][-F]F
3) 270
4) 6
5) 60
6) 6

I dunno what it is, but tweak with #5 and you can get an arrowhead, pine tree, and savannah tree, all with one algorithm. If I get around to adding some sort of randomness to it, it can make really real trees.

Anyhoo, yeah... Just wanted to see what you guys think... If any of you find some sweet fractal, post the options here! :P

NOTE: This demo probably needs a medium-end computer... I used Software2 renderer because OpenGL blurred the UI way too much. It works fine on my comp, but be warned.

Posted: Sat Jul 22, 2006 5:54 pm
by andrei25ni
nice :D