In this post I use ScriptCraft, Minecraft, and L-systems to create fun in-game fractals and discuss how you can too.
L-systems were originally created by a Hungarian botanist named Aristid Lindenmayer who was interested in modeling plant growth. You can model arboreal growth, brush and shrubs, and also roots (by changing the modeling environment a bit to bring about different tropisms). You can do more than model trees though–there are tons of interesting fractals to make like Koch curves, Dragon curves, and Sierpinksi’s Triangles.
Learning exactly how L-systems work requires a bit of knowledge about grammars–a topic which I slept through while in Computing Theory class. I’ve picked up some knowledge since then, but to keep this post short I’ll avoid any grammar shenanigans and say an L-system is simply a series of commands that change over time due to a corresponding set of rules. So if you change the starting commands and/or the set of rules you will get different types of structures like this romantic torch-lit fractal which my turtle built just for you baby (by following the commands).
Putting It All Together
Converting this L-system implementation to work in ScriptCraft was a breeze and you can see the code in the Github repo I created for this project. Follow the installation instructions there if you want to start creating L-system fractals in Minecraft….like this one:
Oh and make you sure experiment with lava and water for cool 2D fractals turned 3D:
Email me any cool fractals you make–especially if you have better texture packs and lighting mods installed than I. Also if you liked this, check out my post on Visualizing Sorting Algorithms.