redUniverse: l-system and turtle
Submitted by f0 on Mon, 2009-05-11 11:22
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; )

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

( 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)); )

( 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)); )