Jump to content

$(W, T, F) ?


michael

Recommended Posts

given the attached file...

the l-system rule $(x, y, z) says :

Rotates the turtle so the upvector is (0,1,0). Points the turtle in the direction of the point (x,y,z). Default behaviour is only to orient and not to change the direction.

which is all fine and good.....but if I use a rule like :

A(i):t<100=$(`ch("/obj/null1/tx")`,`ch("/obj/null1/ty")`,`ch("/obj/null1/tz")`)~(10)FA(i+1)

note the ~(10) > Pitch / Roll / Turn random amount up to a degrees. Default 180.

I get a very strange thing, the next segment of geometry (tube) starts to grow 'backward' toward the origin, and then turns to the position $(x,y,z)...?

if I change it to just (10) , no '~', then it grows straight to the goal, but I loose the ability to generate a nice random shape...

does anyone have any ideas hy this is happening?

in the attached file you can go to obj level and play witht he position of the null if you're bored.. :)

grow_to_point09.zip

Link to comment
Share on other sites

Well, it's not the ~(10) that's doing it, because the same thing happens if you just put a + in there. (in fact, it happens even when I take the + out)

Try this one and see if it does the trick for you:

A(i):t<100=~(20)F$(`ch("/obj/null1/tx")`,`ch("/obj/null1/ty")`,`ch("/obj/null1/tz")`)A(i+1)

-J

P.S. You can also make the null handle persistent, so that you can edit the position on sop level

Link to comment
Share on other sites

Perhaps I'm totally wrong, but could the problem be your premise? You grow one step up, before you do anything else. If you change your premise to A(0), your tube begins to grow into the desired direction.

btw.: arctor your rule was right. You pointed the turtle to the goal-point, then rotated it a random amount and last it went forward into that prepared direction, while Jens ist aiming at the goal at the end of the rule. This orientation isn't used until the next generation.

Link to comment
Share on other sites

ok. Now it got it. I only looked at the overall-shape of the tube at the end and not at the animation, how it grows. :wacko:

It seems that there is something wrong with the interpolation of the $(x,y,z)-operator. It seems to be a bug (perhaps a permutated cross-products in the construction of the ortho-normal coordinate-system).

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