Jump to content

L-System madness


Recommended Posts

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 :(:mellow::D

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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

post-15-1088629482.jpg

  • Like 1
Link to comment
Share on other sites

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.

post-15-1088798747.jpg

Link to comment
Share on other sites

  • 2 weeks later...

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)

:)

Link to comment
Share on other sites

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 :D)

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Hey Alex, this page might help http://www.laptopvideo2go.com/

Achim

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