Stremik Posted June 19, 2004 Share Posted June 19, 2004 Can someone show me please how to properly use the curly braces in L-Systm rules? In my L-System, I have a trunk of a tree and I want to grow two branches out of it. Both starting at the same point on the trunk. If I do it with square braces, the branches are not connected to the trunk, and I want them to smoothly interpolate with it. In The Name Of All That is Holy! How is it done? I've spent almos all night trying to solve this one and I want to sleep. Mommy Quote Link to comment Share on other sites More sharing options...
FrankFirsching Posted June 19, 2004 Share Posted June 19, 2004 Curly braces are used to create single polygons inside the l-system (e.g. to create leaves on a tree without any input geometry). A '{' starts and '}' ends a polygon. The character '.' adds a vertex. This is essential, if you work with curly braces, otherwise they won't have any effect. But they can't be used to create branches. Therefore the square brackets exist. Here is an example: Premise: A Rule 1: A=F[+(90)/(90)B]A Rule 2: B={C.} Rule 3: C=.F+C The rule 1 creates a straight line, that has a branch on every step. This branch is created using square brackets. The shape of the branch is specified by B. The Rule for B Tells the l-system to create a polygon (the curly braces) and the vertex positions are specified by the rule for C. 'C' now simply creates a new vertex ('.') and then moves forward, turns to the right and repeats. After all the repetitions of C rule B is setting a last vertex on the polygon and ends it. Normally branches created with square brackets should be connected to the trunk automatically. Perhaps you have a lower case 'f' instead of a upper case 'F' inside the rules. This lower case character moves the cursor/turtle forward without creating geometry to create non-connecting geometry. Quote Link to comment Share on other sites More sharing options...
Stremik Posted June 19, 2004 Author Share Posted June 19, 2004 Frank. It doesn't work out. Your rule gives this resault: Quote Link to comment Share on other sites More sharing options...
Stremik Posted June 19, 2004 Author Share Posted June 19, 2004 Ooops. Forgot the image. And I want the branches actually grow out of the trunk rather than stick out like that, right out of the body of the trunk. Quote Link to comment Share on other sites More sharing options...
AdamJ Posted June 19, 2004 Share Posted June 19, 2004 Polywire SOP should give you geometry that has brunches smoothly connected to the trunk. Quote Link to comment Share on other sites More sharing options...
old school Posted June 21, 2004 Share Posted June 21, 2004 Yep, use polywire. I rarely let the lsystem sop generate tubes. If you have different curves with unshared points, just run them through fuse SOP then through the polywire SOP. In the preferences for the polywire, there is an entry for l-system. Choose that and the polywire now nicely behaves with the lsystem generated curves. The preferences button is revealed by opening up the stowbar running horizontally near the top of each operator. -jeff Quote Link to comment Share on other sites More sharing options...
fex Posted June 30, 2004 Share Posted June 30, 2004 there is a brute approach using metaballs copied on lsys-spline points those metaballs could be scaled by using a color ramp over generations or branches. Have done a job on modelling corals with this technique: if you someone is intrested i could share more of this 1 Quote Link to comment Share on other sites More sharing options...
mike Posted July 1, 2004 Share Posted July 1, 2004 hi, this looks very nice Quote Link to comment Share on other sites More sharing options...
mark Posted July 1, 2004 Share Posted July 1, 2004 yeah nice coral Quote Link to comment Share on other sites More sharing options...
deecue Posted July 1, 2004 Share Posted July 1, 2004 very nice indeed.. Quote Link to comment Share on other sites More sharing options...
1000 Flushes Posted July 2, 2004 Share Posted July 2, 2004 Hey, Fex Spiffy coral. Can you post some info on how you approached making it? Thanks. Quote Link to comment Share on other sites More sharing options...
fex Posted July 2, 2004 Share Posted July 2, 2004 thx for all replies try a short description of my coral technique: the way corals look is quite similar to merged metaballs... so i found two solutions using Lsystem skeletons with metas first is copy sop and a applied color point attribute for scaling tips; second using metas as leaf input directly in the lsystem which is gives much more control but is hard to work with. Then i used convertmeta and polyreduce sop to get a final not to heavy geometry. Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted July 2, 2004 Share Posted July 2, 2004 Ahh. The beauty of proceduralism. Quote Link to comment Share on other sites More sharing options...
Skello Posted July 12, 2004 Share Posted July 12, 2004 Can you tell us what the bw_grey.ramp image file you used in the image file field is? Quote Link to comment Share on other sites More sharing options...
fex Posted July 13, 2004 Share Posted July 13, 2004 hi skello, this is a ramp created with the external prog called ramp editor( redit.exe). This gradient is used to grade the lsys- splines- tips to get them smaller ( used a primitive sop on those colors) Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted July 13, 2004 Share Posted July 13, 2004 hmm... redit is an insta-crash for me... Quote Link to comment Share on other sites More sharing options...
fex Posted July 13, 2004 Share Posted July 13, 2004 uups... are u using WinXP ?? Quote Link to comment Share on other sites More sharing options...
deecue Posted July 13, 2004 Share Posted July 13, 2004 redit working fine here.. winxp, 6.1.208.. on another note.. fex: why did you choose an image ramp as your method? im not saying it's wrong because your results are obviously great, but i was just curious for my own knowledge why you went that route as opposed to using copy stamping or the point() function to scale the metaballs based off the "gen" or "width" attribs. did you happen to try any other methods and found the image ramp was a better\faster solution? im just interested to see if you investigated in to other things and could comment on them to enlighten us (well me atleast ) thanks, dave EDIT: also.. how can i use an image file (such as a tga) as to appy color to my l-system.. i went ahead quickly made a 500x500 image of a black to white gradient going up and down and couldn't get it to show anything on my l-system. anybody know how to do this? am i just completely thinking about this the wrong way? Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted July 13, 2004 Share Posted July 13, 2004 Hmm... it must be my graphics driver, then... I am still on 44.9 or something of the sort. Trouble is that I am working on my VAIO laptop and had to use Sony supplied nvidia driver. I probably need to replace a particular .ini file with Sony supplied file, I believe, to get the latest nvidia driver to install. Just haven't had time to deal with that yet... Quote Link to comment Share on other sites More sharing options...
puma.snyder Posted July 13, 2004 Share Posted July 13, 2004 Hmm... it must be my graphics driver, then... I am still on 44.9 or something of the sort. Trouble is that I am working on my VAIO laptop and had to use Sony supplied nvidia driver. I probably need to replace a particular .ini file with Sony supplied file, I believe, to get the latest nvidia driver to install. Just haven't had time to deal with that yet... Hey Alex, this page might help http://www.laptopvideo2go.com/ Achim 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.