Jump to content

Another L-system topic about curves...


nezus

Recommended Posts

Hi, not my first issue but first time here !

I'm trying to control the "trunk" of a l-system using a curve. I thought I could get away with tricks gathered from here and there but I was wrong :(

I've tried different approaches first one is using a simple rule:


Premise: A
Rule #1: A=$(point("../my_control_curve", $F, "P",0), point("../my_control_curve", $F, "P",1), point("../my_control_curve", $F, "P",2))F(((point("../my_control_curve", $F, "P",0)-x)^2+(point("../my_control_curve", $F, "P",1)-y)^2+(point("../my_control_curve", $F, "P",2)-z)^2)^0.5)A
[/CODE]

Which doesn't work and is kinda barbaric. I tried to simplify it by declaring new variables :

[CODE]
l: point("../my_control_curve", $F, "P", 0)
m: point("../my_control_curve", $F, "P", 1)
n: point("../my_control_curve", $F, "P", 2)
[/CODE]

so my rule became:

[CODE]
Premise: A
Rule #1: A=$(l, m, n)F(((l-x)^2+(m-y)^2+(n-z)^2)^0.5)A
[/CODE]

or even more readable:

[CODE]
Premise: A
Rule #1: A=B(l, m, n)
Rule #2: B(i, j, k)=$(i, j, k)F(((i-x)^2+(j-y)^2+(k-z)^2)^0.5)A
[/CODE]

[EDIT] When if move forward in time, my first segement is moving to the corresponding point then the rest of the lsystem just stacks at this point.

but still no luck. Any clues ?

Thx for your time :)

Edited by nezus
Link to comment
Share on other sites

Well I think its simply impossible. My whole idea was based on the fact that F was a terminal symbol, which it is, but the graphic interpretation comes after the string generation. Meaning that my coordinates are evaluated only once and replaced everywhere in the string which explains the "stacking effect".

I guess I'll have to go with an animated Carve SOP with a Copy SOP instancing stamped Lsystem.

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