Hello,
How can I use L-System variables in expression functions within rules ?
I can for example create a conditional rule like …
A(h) : `sqrt(4)` = 2 -> F …
But I can't use:
A(h) : `sqrt(h)` = 2 -> F …
Is there any way to do that ?
Thanks,
Frank
L-System variables in expression functions
4890 5 2- afrank
- Member
- 6 posts
- Joined: Nov. 2008
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Online
Hmmm… It works when I use a variable in to rand() in a simple lsystem rules.
Is there a file you can send in to Support to try out and start a case with?
btw there are a couple undocumented features in lsystems (that should be documented).
One is strdump() to expand parts of rules in-place.
strdump( iterations, <rules_to_duplicate>)
Is there a file you can send in to Support to try out and start a case with?
btw there are a couple undocumented features in lsystems (that should be documented).
One is strdump() to expand parts of rules in-place.
strdump( iterations, <rules_to_duplicate>)
There's at least one school like the old school!
- deecue
- Member
- 412 posts
- Joined: July 2005
- Offline
I'd like to know about some of those additional undocumented features…
I tried experimenting with Frank's issue and couldn't get very far in a solution. For the most part, only arithmetic operators seemed to be happy when included in a conditional statement. Of course in the situation of sqrt(), you could just use h^0.5 in place and get it to work, but I highly doubt he was actually needing to get the sqrt function to work, and was more so wanting any expressions in the conditional statement to process successfully.
I tried experimenting with Frank's issue and couldn't get very far in a solution. For the most part, only arithmetic operators seemed to be happy when included in a conditional statement. Of course in the situation of sqrt(), you could just use h^0.5 in place and get it to work, but I highly doubt he was actually needing to get the sqrt function to work, and was more so wanting any expressions in the conditional statement to process successfully.
Dave Quirus
- afrank
- Member
- 6 posts
- Joined: Nov. 2008
- Offline
Indeed, I did not specifically needed sqrt. The problem is that not all of them are available. What I'm really worried about is when making custom expression functions specifically needed for conditions in L-Systems. Will it be able to use those ?
I'll see if I can make some time and create a test file.
Thanks for looking into this.
Frank
I'll see if I can make some time and create a test file.
Thanks for looking into this.
Frank
Frank Aalbers
Effects TD
Pixar Animation Studios
Effects TD
Pixar Animation Studios
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Online
- deecue
- Member
- 412 posts
- Joined: July 2005
- Offline
hey jeff,
try this out:
Premise: A
Rule 1: A(h):h^0.5<5=FA(h+1)
vs
Premise: A
Rule 1: A(h):sqrt(h)<5=FA(h+1)
according to my understanding, the first setup should quit after 25 iterations (and it does so accordingly). However, the second should do the same and it does not.
rand() does seem to work fine in the condition, however i guess the question has to do with all expression functions, and in Frank's case, custom expression functions being able to work in the conditional statement. i just happen to be curious myself to be quite honest..
thanks!
dave
try this out:
Premise: A
Rule 1: A(h):h^0.5<5=FA(h+1)
vs
Premise: A
Rule 1: A(h):sqrt(h)<5=FA(h+1)
according to my understanding, the first setup should quit after 25 iterations (and it does so accordingly). However, the second should do the same and it does not.
rand() does seem to work fine in the condition, however i guess the question has to do with all expression functions, and in Frank's case, custom expression functions being able to work in the conditional statement. i just happen to be curious myself to be quite honest..
thanks!
dave
Dave Quirus
-
- Quick Links