Jump to content

Copied L-systems and gravity direction.


cgp

Recommended Posts

If you want to do this with L-systems specifically, you have to write a set of rules that would allow you to input:

an initial growth direction (derived from the normal on the target surface)...  L-systems can read its own variables b,c,d , you can rotate the initial segment to give the initial growth direction.

But then you have to figure out a set of rules to will implicitly growth the trunk towards global Y+, so that it eventually becomes vertical, but not too soon so that it doesn't hit your sphere.

You also also tropism with T(g) which will allow you to grow the secondary branches towards global Y-.

You can also hard code the premise in a for loop (parameter premise car reference a string you build in a for loop)

It seems doable, but I've seem this recently:

It would be a lot easier to compute the location of a few points from one point in space (initial growth point), one normal, and a bounding sphere in which you can't enter.

  • Like 1
Link to comment
Share on other sites

The way I've done this in the past is by not orienting the L-system copies with template point attributes (remove N/up/orient entirely), and instead orienting the turtle for each copy using stamp() functions. The $(x,y,z) L-system command can orient the turtle to grow in whatever direction, while maintaining world Y-up for the tropism (T) function.

I wrote a blog post a few years ago with an example .HIP included. It's way out of date but L-systems haven't changed much. Check it out: http://www.toadstorm.com/blog/?p=230

  • Like 1
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...