Jump to content
michael

l-system question

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

Share this post


Link to post
Share on other sites

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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
again from the geometry pdf:

:rolleyes:

It's a monday :P

Thanks guys :D ... will work on this

Share this post


Link to post
Share on other sites

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!

Share this post


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

Share this post


Link to post
Share on other sites

Errr... Never mind the rail shape :)

What about the "Generations" parameter in L-System?

Is it possible to override it with custom parameter?

Share this post


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

Share this post


Link to post
Share on other sites

I'm trying to make a "Feather Generator" OTL that would have a 6 feather presets(that would basically mean 6 L-Systems) and each one of them would be adjustable from the custom panel.

Share this post


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

Share this post


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

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

×