Skip to content

TravisWhitaker/lsystems

 
 

Repository files navigation

Lindenmayer Systems

I was bored last night so I looked at something I found a while back called lindenmayer systems, which are basically a way to formally define string rewriting, developed by some guy whose last name was Lindenmayer, who was a biologist or something, and invented them as a mathematical way to model plant growth in the 1960s. I programmed a bunch of different systems in python, as well as a basic library for creating and displaying these systems pretty easily. All of my examples use turtle, but the library can really do anything, as long as it is wrapped in a function with no arguments

The order of the created files (so that you can see the progress, and also because they generally go from less to more complicated/cool):

  • stupid_tree.py
  • lsys.py
  • koch_curve.py
  • sierpinski.py
  • sierpinski2.py
  • koch_island.py
  • cool_square_thing.py
  • fractal_wheat.py

I got it down to a pretty general system, but there are somethings that need to be explicitly programmed everytime for flexability overall. Maybe if I made a libary with some general functions, it would be cool. Maybe that really woudn't do that much though, I don't know.

About

A foray into Lindenmayer Systems programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published