Lindenmeyer fractals by LLMs
Three years ago I wrote a series on Lindenmeyer fractals, including randomly generating them. While there were some interesting random results, they were qualitatively different from the highly regular ones designed by humans. Let's see if LLMs can do better.
Claude reproduced several known L-systems, spitting out a Koch snowflake, two Sierpiński triangles, and a dragon curve with 88-degree turns instead of 90-degree turns. It included several definitions that popped and pushed state, but I haven't added support for that to my L-system code, so I didn't draw any of those. The only remaining system was this wandering line:
ChatGPT produced some wandering lines like the one above, a sloped line made of squares, and this looping design:
It did, however, produce one interesting one, which it called a "hexagonal weave":
(def hex-weave
'{:axiom [A]
:rules {A [F + B - F - B + F]
B [F - A + F + A - F]}
:moves {+ [:turn 60]
- [:turn -60]
F [:forward 1]}})
I don't know if it derived the definition from some known system. If it looks familiar to you, let me know.
My prompt for ChatGPT and Claude was quite rudimentary, so if you have recommendations for how I might elicit more interesting designs, please email me.