Jump to content
Sign in to follow this  
michael

$(W, T, F) ?

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

persistent handle bad...check out the Persistent Handle Manager....I had a file a couple of weeks ago with over 950 handles listed in there...

thanks for the edit...I'll try it tonight...I'd still like to know why it does this <_<

Share this post


Link to post
Share on other sites

yay!...

thanks very much.....this was bugging me for days...

hmmm..I think I get it.....

I was telling it to grow something then point in a direction....your way tells it to point in a direction and then grow...have to keep that in mind

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

hmm...

the premise was just in there already...it should'd have any effect on the rest of the l-system...it was the growing 'backward' that was causing me trouble...you can see that it's growing backward if you turn on normals

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×