|
Author |
Topic: Plantlike (Read 1118 times) |
|
Mike Davis
|
Plantlike
« on: Aug 22nd, 2002, 7:26am » |
|
http://www.lightcycle.org/workspace/treefold/ TreeFold illustrates a simple method of producing plantlike structures with a recursive grammer. Mouse movement changes drawing parameters, clicks cycle through the example structures. The method used is loosely related to Lindenmayer systems, but no real string expansion takes place and replacement is sequential. This makes it more difficult to predict how a string will be interpreted, but also leaves some nice properties, like tapered branching. I plan to write a real L-System implementation, but thought I'd try this simpler variant first. See the source for more info.
|
|
|
|
eviltyler
|
Re: Plantlike
« Reply #1 on: Aug 22nd, 2002, 3:48pm » |
|
wow. very very nice.
|
|
|
|
Frederik De Bleser Guest
|
Re: Plantlike
« Reply #3 on: Sep 23rd, 2002, 10:21pm » |
|
You programmed L-Systems! Very nice. What license does the code fall under? This might be very useful to port to full 3-dimensional L-Systems. The interaction is a bit fiddly: moving the mouse just a little bit causes great reaction, and nothing happens outside of a very close focus area. Perhaps you should expand that area so the structure can be more easily controlled.
|
|
|
|
Mike Davis
|
Re: Plantlike
« Reply #4 on: Sep 24th, 2002, 7:44pm » |
|
All the Proce55ing code I write is free for any use, so it is cool to build on or modify it. I'm working on a 3D L-System project in OpenGL, but it's being written as I learn OpenGL. The control problems are very true. Right now, each axis on the canvas lets you change a set of angles from 0 to 360 degrees. I probably should have limited that. In the source, you can lower the value of "speed" to make the transitions slower; unfortunatly, I set the value to the best for my machine. I could have made that a slider.
|
|
|
|
|