Title: Draw L-system fractals interactively in Python
This example builds upon the two previous examples:
This example lets you enter L-system parameters interactively to draw fractals.
The changes are fairly involved (because the program uses tkinter) but they're not very interesting so I won't show them here. Download the example to explore them for yourself.
If you pick a fractal from the dropdown list, the program populates its text boxes with that fractal's L-system parameters. You can modify those parameters if you like. Then click Draw to draw the fractal.
Two interesting features of this program involve ferns and spirals. If you start with a fern fractal and modify the parameters, you'll often get something fern-like, as in the picture on the left below. Because it's asymmetrical, its shape can change quite a bit at different depths.
The picture on the right below shows a spiral. It's not completely obvious whether spirals are fractals. They do have self-similarity and appear the same at different scales but they don't show much in the way of complexity. I don't know if they have fractional dimension. Some online posts say definitely yes and others say definitely no. The former seem more authoritative so my guess is at least some are. In particular, I suspect this one is fractal.
Download the example to see additional details.
|