Code which procedurally creates plants.
Procedurally generating shapes which are plant like is very interesting. This algorithm randomly chooses some basic parameters such as the amount of branches and the amount of segments in the main stem. The main stem is given "energy", which is spent on growing other stems, when the end of the branch is reached either a flower or a leaf is grown. Leaves also create energy which is propagated throughout the plant, which results in the segments widening and extending. The plants are affected somewhat by "wind" but this is still a little unpolished.