nezus Posted September 24, 2013 Share Posted September 24, 2013 (edited) 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: ARule #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: ARule #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: ARule #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 September 24, 2013 by nezus Quote Link to comment Share on other sites More sharing options...
nezus Posted September 25, 2013 Author Share Posted September 25, 2013 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. 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.