L-system fractals!

Community Forums/Showcase/L-system fractals!

chwaga(Posted 2008) [#1]
Hi, I just thought I'd share with you some Lindenmayer system fractals a made a month back. The code is sloppy and probably uncommented, but you can make some pretty neat stuff with it.

I only made 2: a (fake) Serpinski triangle, and a Dragon's curve.

Find them here and here

And for the source...

Fractal1.exe:


And Fractal2.exe:



Anyone who wants to modify this so it's more flexible is more than welcome! Try changing the angle values, you get some weird results. Check out the dragon (fractal2) at 75 degrees


chwaga(Posted 2008) [#2]
bah, it's cool and you know it! somebody comment on my day's work!!!!!!


Xzider(Posted 2008) [#3]
Neat


Torrente(Posted 2008) [#4]
It's cool, but it's also been done 2 or 3 times on these forums before ;)

It'd be much neater if you made an .exe that could read a file containing the information about the L-system (rules, line-length, angles, etc...), and then saves that image. A lot easier to show your work that way. Also, make support for an arbitrary amount of rules, and then you'll be on a roll.


chwaga(Posted 2008) [#5]
nah, I'm busy :P


TomToad(Posted 2008) [#6]
I actually made something like that. It would read the commands from a .txt file, then compute it twice. First time without rendering, to figure out the extreme coordinates, then second time, scaling so it fits perfectly within the window.
Unfortunately it is on my old drive so I don't have it available to show at the moment.

Edit: Found it. Here is the source to the one I wrote.
also it is a Blitz3D program and I never commented the code.



Here is hilbert.ls



Axel Wheeler(Posted 2008) [#7]
Very cool. Even if it's been done before, nothing stretches your brain like implementing something like this.

I would add a percent complete indicator and a cancel option during processing.

Well done Chwaga!