‹ redUniverse: MRCM and IFSredTie ›

redUniverse: L-System and Turtle

2009-05-11 13:22:32 supercollider

Now added RedLSystem and RedLTurtle to my redUniverse quark. RedLSystem is a fairly standard string rewrite class. One special feature is that it saves the structure/tree/recursion depth of the rewrite process. RedLTurtle either plot L-systems or standard strings. It comes with a set of default drawing functions, but you can easily add your own commands.

(
l= RedLSystem("F", ($F: "F[+F--F]+F"));
6.do{l.next};
RedLTurtle(l, 40, 10, 0.9, 0.1).makeWindow;
)

RedLTurtle screenshot 2

(
l= RedLSystem("F", ($F: "|[-FFF--F]+F"));
6.do{l.next};
RedLTurtle(l, 20, 20, 0.95, 0.2).makeWindow;
)

RedLTurtle screenshot 3

(
l= RedLSystem("F", ($F: "|[--F][+F]-F"));
8.do{l.next};
RedLTurtle(l, 400, 20, 0.65, 0.1).makeWindow(initTranslate: Point(0.5, 0));
)

RedLTurtle screenshot 0

(
l= RedLSystem("F-F-F-F", ($F: "F[F]-F+F[--F]+F-F"));
5.do{l.next};
RedLTurtle(l, 6, 90, 0.9).makeWindow(initTranslate: Point(1, 0));
)

RedLTurtle screenshot 1

‹ redUniverse: MRCM and IFSredTie ›