Jump to content

l-system stop branch from groing


rdg

Recommended Posts

Not sure if this is modelling related, but:

How can I stop branches from growing further in a lsystem?

branch_stop.hip.tar.gz

I alreday know that A:t<5=FA would stop this rule after generation #5.

And a metaball test would stop the branches if they enter/leaver this volume.

But in my setup, branches are curling left/reght from the main stem, and I want them to stop growing after they reach a certain number of segments. Can this be done?

Thanks,

Georg

Link to comment
Share on other sites

this is quite simple :)

to stop growing you can use % symbol. but if u want to stop growing after f.e. 5 generation u have to use this method:

premise -> FA

A = F[+B]F[-B]A

B= FB

now we have branches which grows away from the rtunk. but how to stop growing?

A=F[+B(3)]F[-B(5)]A

B(i) :i>0 = FB(i-1)

when calling B(3) rule branch will grow until i > 0, we decrementing "i" each time calling B(i-1)

now we have 3 steps in right and 5 steps in left side. thats all :)

Edited by mentor
Link to comment
Share on other sites

I understood it - now it's quite simple ;)

Thank you!

this is quite simple :)

to stop growing you can use % symbol. but if u want to stop growing after f.e. 5 generation u have to use this method:

premise -> FA

A = F[+B]F[-B]A

B= FB

now we have branches which grows away from the rtunk. but how to stop growing?

A=F[+B(3)]F[-B(5)]A

B(i) :i>0 = FB(i-1)

when calling B(3) rule branch will grow until i > 0, we decrementing "i" each time calling B(i-1)

now we have 3 steps in right and 5 steps in left side. thats all :)

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...