TreeSim is a program that can render plants from a given LSystem.
The program applies a given ruleset to an axiom a specified number of times. Then, it applies user-defined rules for each resulting term, such as moving the vertex cursor or placing a vertex.
The program fills in the resulting tree by constructing a parent-child relationship between the vertices that were placed. Mass springs are added between each child, parent, and grandparent to simulate structural forces. Wind and gravity forces can be controlled by the user during the simulation, and the tree's structure will respond to these changes.
The images on this page showcase this L-System:Pythagoras Tree
To increase structural integrity of the tree, the user may also add a restoring force to certain parts of the tree. The mass of the resulting vertex can also be controlled. These features allow certain parts of the tree, such as the trunk, to stay more rigid under gravity and wind forces.
A simple two-dimensional mesh is generated on the fly after the LSystem's result is computed. This mesh connects the vertices together based on their radii and is updated as the tree responds to forces.