[sharing] Lindenmayer String Expansion JS-abstraction

tmhglnd's icon

Hi all,

I'm sharing this abstraction that outputs generated L-Systems. This is for anyone who is interested in using generative algorithms for algorithmic composition. A lindenmayer string expansion generator for which custom rules can be easily set in a dictionary. Multiple th.linden can access the same dictionary of rules with the @dict attribute.

In the default mode the rules are set with integer values and spaces are used to keep values separated, useful for midi-note sequences. In the ignore_ws mode the system works on per-character basis, useful when combining special characters and such. The help-file has some examples for clearification. Hope some find it useful!

Screenshot of the helpfile

Anna Nasor's icon

Hi.
Thanks for sharing.
This is useful indeed
Regards, onplanners

Taylor Brook's icon

Thank you! This is very interesting and timely as I'm learning javascript

Francesco Cimino's icon

Hi Timo!

Really enjoying your implementation of the L-system! I can't seem to manage to get it to start on an axiom other than a number from 1 to 9. For example, in the help file it says that 12 can be an axiom, as it's in the dictionary. However, when I do that I get "1" "2" as a result. Did I do something wrong?

tmhglnd's icon

Hi! Thanks, I think you've encountered a bug. I will investigate soon.

Francesco Cimino's icon

Cool, looking forward to the update!

tmhglnd's icon

Should be fixed now