mercury icon indicating copy to clipboard operation
mercury copied to clipboard

L-system sequence generator

Open tmhglnd opened this issue 5 years ago • 0 comments

Add javascript function that allows to generate an Lindemayer-System tree sequence based on predefined rules, axiom and number of generations. Useful for procedurally generating of rhythms, melodies and other sequential data.

Example:

// syntax: linden(<nth-generation> <axiom> <rule-1> <rule-2>)

ring mySystem linden(6 0 [0 0 1] [1 0])
// returns: [0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0]

tmhglnd avatar Dec 09 '19 14:12 tmhglnd