views:

175

answers:

2

I'm looking for a good way to represent organic growth - especially trees and flowers - using code.

I've found Lindenmayer Systems as a reasonable way to portray this, but need a good place to start programming this.

Any good suggestions?

A: 

I am not sure how much you already know on the topic, but I believe Wikipedia's article on L-system should be a good start.

"using code" is a bit fuzzy, so I can hardly answer. You might find some freeware to experiment with L-systems, you can play with some graphical language like Processing, do that in GDI or Java2D (or 3D), etc.

There are other methods too, my own Ferns - Static view was made with Processing, drawing short lines, using a hierarchical class system to represent trunk, branches and leaves.

PhiLho
+1  A: 

Start by looking at Laurens Lapre's LParser system page at home.wanadoo.nl/laurens.lapre/.

He's made the source code available and it's a great place to kick off from. The code is highly useful as it is - I once wrapped it up in a dll with minimal changes to employ in a landscape generation program and it worked a treat.

LParser has been around a while, but that doesn't stop it being a great implementation and a really neat bit of coding.

Cruachan