L-System: What do letters other than A-L do?

Post questions on how to use or achieve an effect in Inkscape.
LindaJeanne
Posts: 8
Joined: Mon Aug 27, 2012 2:46 am

L-System: What do letters other than A-L do?

Postby LindaJeanne » Mon Aug 27, 2012 3:01 am

Greetings,

I've searched the forum for an answer to this question. And while I've found some interesting posts (including Ailurus' update to the extension -- thanks!) I've been unable to find an answer to this. According to the help files and all the instructions I've been able to find, A thru F draw forward one step, G thru L move forward one step without drawing.

But several of the examples I've found use other letters.
[*] The Dragon Curve at http://kanga.nu/~claw/blog/2008/11/16/g ... r-tilings/ uses an "X"
[*] The Penrose Tiling at . Thanks!

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: L-System: What do letters other than A-L do?

Postby brynn » Mon Aug 27, 2012 9:22 am

Image
Welcome to InkscapeForum!

I've enjoyed playing with the L-System extension, but there still are some mysteries for me. And one is just what you've asked. Maybe Ailurus can explain. Meanwhile, I did look up the Wikipedia for L-System: http://en.wikipedia.org/wiki/L-system. I didn't read it closely yet, but some things might be explained there.

LindaJeanne
Posts: 8
Joined: Mon Aug 27, 2012 2:46 am

Re: L-System: What do letters other than A-L do?

Postby LindaJeanne » Mon Aug 27, 2012 2:33 pm

Thanks! :).

The Wikipedia article seems to support (comparing the Dragon Curve in the article with the Inkscape dragon curve) my guess about the "extra" letters. Maybe someone will jump in who knows for certain.

Funny story about that wikipedia article, actually...

Ailurus
Posts: 115
Joined: Fri Oct 22, 2010 9:53 am
Location: The Netherlands
Contact:

Re: L-System: What do letters other than A-L do?

Postby Ailurus » Mon Aug 27, 2012 5:31 pm

Hi LindaJeanne,

Your guess is right, "A-F" are used for drawing (= moving with the pen down), and "G-L" just for moving (with the pen up). The other letters don't cause any movement, they are used to rewrite the string. Examples:

Axiom F, Rules F=FF: The initial drawing will just be a single line. Then the next iteration/step this line is replaced by two lines, the step after that the two lines are replaced by four lines, etc. The number of lines doubles every iteration (1,2,4,8,16,...). This is how the string looks for the first three iterations:

F (=Axiom)
FF
FFFF
FFFFFFFF

Other option, Axiom XF, Rules X=XF: The initial drawing is again just a single line (X doesn't do anything in this step). In the second step, the X is replaced by XF, so then you'll have two lines. The difference is only notable in the following step -- you'll have three lines here, not four! This is how the string looks for the first three iterations:

XF
XFF
XFFF
XFFFF

You'll notice that, in this case, the F is just rewritten to itself, i.e. there is the implicit rule F=F. But you don't have to write that down :)

I plan on writing a tutorial for L-Systems somewhere this or next week, with some examples and thoughts on how to design and come up with the right axioms and rules. Have fun with the extension!

LindaJeanne
Posts: 8
Joined: Mon Aug 27, 2012 2:46 am

Re: L-System: What do letters other than A-L do?

Postby LindaJeanne » Wed Aug 29, 2012 4:45 am

Very helpful, thanks!


Return to “Help with using Inkscape”