HTML Canvas string-rewriting fractal

I’d hoped to have a working demo in here, but WordPress doesn’t like the <canvas> element, so here are a couple of static screendumps:

looks like a buffalo being attacked by crinkle-cut chipsI wrote a routine in JavaScript that recursively rewrites strings of instructions, then interprets them as a simple turtle-like language to draw on the canvas. In my copious free time, I’ll release it as a simple web app that you can play with these L-systems. But you can do some fun stuff here until I get it written.

(for more details, see Appendix C of H. Peitgen and D. Saupe, Eds. The Science of Fractal Images, New York: Springer, 1988.)

Leave a comment

Your email address will not be published. Required fields are marked *