[PD] The sound of algae growing
chris at mccormick.cx
Thu Nov 1 09:37:15 CET 2007
Who wants to make some fractal music? Here are two abstractions that
implement a Lindenmayer system. <http://en.wikipedia.org/wiki/L-system>
[s-ireplace] is an abstraction that takes a single integer and outputs a
list of integers according to the rules specified. So you might send a
message [rule 1 2 3( and then when you send a [1( you will get back a
list '2 3'.
[s-lsystem] uses [s-ireplace] internally to iteratively replace lists
of integers with lists of integers according to rules defined in the
same way as above, thus implementing a Lindenmayer system.
Lindenmayer systems are great for generating complex sets of data from
simple rules and initial values.
If you want, you could also use these with Gem to make natural looking
tree-like 3d structures. Check the pd-list archives for a previous
implementation of that idea which used a much simpler Lindenmayer system
which was not quite as flexible.
More information about the Pd-list