michael Posted September 20, 2003 Share Posted September 20, 2003 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 Quote Link to comment Share on other sites More sharing options...
anakin78z Posted September 22, 2003 Share Posted September 22, 2003 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 Quote Link to comment Share on other sites More sharing options...
michael Posted September 22, 2003 Author Share Posted September 22, 2003 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 Quote Link to comment Share on other sites More sharing options...
michael Posted September 23, 2003 Author Share Posted September 23, 2003 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 Quote Link to comment Share on other sites More sharing options...
FrankFirsching Posted September 23, 2003 Share Posted September 23, 2003 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. Quote Link to comment Share on other sites More sharing options...
michael Posted September 25, 2003 Author Share Posted September 25, 2003 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 Quote Link to comment Share on other sites More sharing options...
FrankFirsching Posted September 25, 2003 Share Posted September 25, 2003 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. 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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.