L-System Generated Windy Plants

2023-06-12に共有



I learned about L-systems the other day, so here's my first shot at making one. It generates a plant whenever you hit the main action button.

L-System Parameters:

Constants are any characters that don't appear as a rule index - all rules for a given variable have an equal chance of being chosen. The generator runs five iterations for each plant.

A means "go forward," B and C mean "turn and go forward," {} and () mean "start a new branch and turn afterward," and . means "draw a circle."

All animation comes from the rendering portion - the L-system only runs to initially create the plant.