Jump to content

Quick L-system Question


Recommended Posts

The l-system help describes two methods for "edge rewriting"...

Premise F(1,1,3,3,0)

Rule 1 F(i,j,k,l,m) :m=0 = F(i,j,k,l,0)+F(i,j,k,l,1)+

Rule 2 F(i,j,k,l,m) :m=1 =-F(i,j,k,l,0)-F(i,j,k,l,1)

Which gives a nice transition between generations, but is quite long to write out, and:

b ch("generations")

Premise l

Rule 1 l:t<b=l+r+

Rule 2 r:t<b=-l-r

Rule 3 l=F

Rule 4 r=F

Which is much simpler to write out, but doesn't transition between generations, instead it shrinks towards the origin and then suddenly jumps to the next pattern... also I don't understand how the first part (l:t<B) works/what it means.

Is there a way to get the effect of the first method, but so it is simpler to write like in the second method? I'm new at l-systems so please keep it simple (if possible)

(EDIT) I skimmed a bit further through "algorithmic beauty of plants" and it seems like edge rewriting is abandoned for a while...

Edited by kai.scorpio
Link to comment
Share on other sites

  • 1 year later...

I have the exact same question (I suspected that someone else might have asked it). I'm sad to see there were no replies. I can answer that the code t<b tests the current generation against the final generation, I assume so that the rule will not match on the final generation. I too would like to use the simpler syntax, as suggested in the help, but unfortunately it does not seem to work.

anybody ?

thanks

-ranxx

The l-system help describes two methods for "edge rewriting"...

Premise F(1,1,3,3,0)

Rule 1 F(i,j,k,l,m) :m=0 = F(i,j,k,l,0)+F(i,j,k,l,1)+

Rule 2 F(i,j,k,l,m) :m=1 =-F(i,j,k,l,0)-F(i,j,k,l,1)

Which gives a nice transition between generations, but is quite long to write out, and:

b ch("generations")

Premise l

Rule 1 l:t<b=l+r+

Rule 2 r:t<b=-l-r

Rule 3 l=F

Rule 4 r=F

Which is much simpler to write out, but doesn't transition between generations, instead it shrinks towards the origin and then suddenly jumps to the next pattern... also I don't understand how the first part (l:t<B) works/what it means.

Is there a way to get the effect of the first method, but so it is simpler to write like in the second method? I'm new at l-systems so please keep it simple (if possible)

(EDIT) I skimmed a bit further through "algorithmic beauty of plants" and it seems like edge rewriting is abandoned for a while...

Link to comment
Share on other sites

Hi folks.

I just copy/pasted this from the help section:

F(l,w,s,d) Move forward (creating geometry) distance l of width w using s cross sections of d divisions each.

The example is:

Premise F(1,1,3,3,0)

Rule 1 F(i,j,k,l,m) :m=0 = F(i,j,k,l,0)+F(i,j,k,l,1)+

Rule 2 F(i,j,k,l,m) :m=1 =-F(i,j,k,l,0)-F(i,j,k,l,1)

m is a variable introduced to set conditions with

Erik

Edited by Ezz
Link to comment
Share on other sites

yes, this works, but it is ugly, and doesn't look like the code from the book. The question is why doesn't the second formulation in the help work.

-ranxx

Hi folks.

I just copy/pasted this from the help section:

F(l,w,s,d) Move forward (creating geometry) distance l of width w using s cross sections of d divisions each.

The example is:

Premise F(1,1,3,3,0)

Rule 1 F(i,j,k,l,m) :m=0 = F(i,j,k,l,0)+F(i,j,k,l,1)+

Rule 2 F(i,j,k,l,m) :m=1 =-F(i,j,k,l,0)-F(i,j,k,l,1)

m is a variable introduced to set conditions with

Erik

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...