Jump to content

l-system question


michael

Recommended Posts

From "Geometry.pdf"

Override parameters for F, f, G, h, H take the form of:

F(i,j,k,l,m)

i Override Length.

j Override Thickness.

k Override # Tube Segments.

l Override # Tube Rows.

m User parameter.

The k and l override parameters allow dynamic resolution of tube segments.

L-system OP

Link to comment
Share on other sites

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Well, it's cool that you can overide.. but what is the syntax? I mean, "F(i=0.1)" or something like that....

ie, "F" is full length forward, "H" is half the length forward... what if I want 1/3 of th length forward? ... or maybe even control the precise length with one of the sliders ie "( b )" etc..

Link to comment
Share on other sites

again from the geometry pdf:

Parameters assigned to geometric symbols (e.g. F, +, or !) are interpreted geometrically.

For example, the rule:

F(i, j) = F(0.5*i, 2*j)

will again replace each F with a new F containing modified parameters. In addition

to this, the new F will now be drawn at half the length and twice the width.

so to go 1/3 the length forward use F(.33*i) and to control it with 'b': F(b*i)

Link to comment
Share on other sites

The most straightforward way of doing it is like this

F(0.3)

If you want to override the width than you put it like this

F(0.3,0.2)

And so on with the rest of the overrides.But this method isn't very,whatchacallit, procedural.

These overrides can be used in form of

F(i,j,..and so on)

You can find an example here.

I still am not shure how it all works so I guess will have to wait till someone will explain it in more popular fashion. :)

---------------------------------------------------------------------------------------------

Oooops! arctor beat me to it. O well...

La la la la la la la.......

Link to comment
Share on other sites

  • 2 weeks later...

Another two questons. :)

Is it possible to define a custom shape for L-System to use for generating branches geometry. For instance,... what if I want a branch to be shaped like a rail?

Another thing that I need is to somehow implement some sort of a "hittest" thingimagiggy that would basically detect when a branch touches an object and would give the command to a branch to make a turn.

("metatest" is not going to work since it is practically impossible to create oddly shaped volumes with metaballs)

Anyway. I don't have a slitest idea how to approach this!

Can anyone help me out with this one?

Thank you!

Link to comment
Share on other sites

"...branch to be shaped like a rail?..."

not sure what you mean here...

for the "hittest" thingimagiggy...I don't know - maybe something that determines if the token is within the bounding box of another piece of geometry and then that causes a change in what rules is applied....

Link to comment
Share on other sites

thanks for double posting :)...6 pages !!! :lol:

anyway...

you can click on 'Generations' to put it into expression mode and then do what ever you want...

here is a good one to try :blink: :

$F * 50

as for saving out the l-system out as text...I don't know...you can MMB on the tile and see the string there...so I would assume that you can....but as to how...? maybe some kind of opwrite command...not sure...sorry

Link to comment
Share on other sites

Having trouble again!

...here's what I have

Premise: A
Rule 1:    A(i):i<50=F(0.0005)[+(60)B]A(i+1)
Rule 2:    B(i):i<8=F(0.002)B(i+1)

I now need to control the thickness of a tube so, that it decreases with every new generation.

Entering it like this

B(i,j):i<8=F(i,j)B(i+1,j-0.1)

only screwes up everything.

What would be the right way to do it?

Link to comment
Share on other sites

Why don't you just insert a ! before the A(i+1) and B(i+1) such that it looks like:

Premise: A
Rule 1:    A(i):i<50=F(0.05)[+(60)B]!(0.98)A(i+1)
Rule 2:    B(i):i<8=F(0.2)!(0.8)B(i+1)

The ! multiplies the current thickness with its value. You could also use the default-value, that can be set in the tube-tab.

I also took out 2 zeros of the F-override-values, because it was too small for me to see (had some clipping-errors). The overall-size of the feather could be adjusted afterwards using a transform-SOP.

By the way, why do you use absolute step-sizes. You could make the feather tapered if you let the rules determine the actual step-size. For example:

Step-size: 0.05
Premise: A
Rule 1:    A(i):i<50=F[+(60)!(0.5+i/100)"(2-i/30))B]!(0.98)A(i+1)
Rule 2:    B(i):i<8=F!(0.8)B(i+1)

You could alter the formula 2-i/30 for the step-size-scale to get a nonlinear shape of the feather. Perhaps a sin or cos could help. Or a cubic interpolation of some hard-coded control-points would make the shape more configurable.

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