An L-System in javascript & canvas. You can use a drop-down box to alter which fractal is drawn and how many iterations to perform.
An L-System is a way of describing self-similar fractals, like plants - it works by changing symbols according to rules and performing multiple iterations.
To display, the final string is interpreted by a turtle which uses them as instructions (eg go forward, turn left, etc)
The
wikipedia article is worth a look, it is where I got the axioms & rules from.
Warning: If you alter the values and set them to high it may freeze your browser
UPDATE:
L-System version 2
No comments:
Post a Comment