Algorithmic botany is the study of plants through modeling them via algorithms. Lindenmeyer came up with some very elegant string re-writing rules that are able to simulate the growth of many plants - they are known as L-systems and work like a grammar, but instead of recognizing a language, they generate it. In essence, an L-system might look like:
variables: A B
rules: A -> B, B -> AB
If you were to give the string AAB to this l-system, the first-rewrite would turn it into: BBAB. The second re-write would turn it into ABABBAB, and so forth.
In abstract, they generate strings, but those strings can also be visualized in 2d or 3d. There’s a lot of research going on out of one particular lab in algorithmic botany, as well as many individuals who use L-System rules to generate realistic looking plants.
I spent some time playing with L-Systems and three.js, with the idea to create a snowglobe filled with a 3d plant. The ultimate goal was to create an L-System that is aware of the environment - things like sunlight, nutrition, soil level, etc, but I never made it that far, as most of the time was spent fiddling with 3d and trying to animate growth over time. I found it difficult to animate the growth in 3d, so next time I will use 2d drawing and animation and worry about 3d after, since the concept should work in abstract.