[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile code for L-system
From: |
Dave Griffiths |
Subject: |
Re: Guile code for L-system |
Date: |
Wed, 24 May 2006 14:16:16 +0100 (BST) |
User-agent: |
SquirrelMail/1.4.6 |
> I want to write in Guile the code implementing these following rewriting
> rules, which are taken from L-system rewriting (from Lindenmayer's
> "Algorithmic beauty of plants")
>
> Axiom a
> a -> b
> b -> ab
>
> So, it should be create these lists
>
> `(a) `(b) `(a b) `(b a b) `(a b b a b) `(b a b a b b a b)
>
> You may notice that the lists' length are Fibonacci's number.
I don't know if you are asking, but I have some code to do this (with
strings rather than lists though) here:
http://cvs.savannah.gnu.org/viewcvs/livenoisetools/livenoisetools/pattern-cascade/lsys.scm?view=markup
I've been using it to generate music for live performaces. FWIW I've
written this code in C++, python and now scheme, which has turned out to
be a lot more elegant, as usual :)
cheers,
dave