FrankFirsching Posted April 6, 2003 Share Posted April 6, 2003 You can use the same variables in different rules. Houdini will set the corresponding values based on the current token. This means, that the variables are local to the rules, not global to the whole l-system. In the premise you only define a starting-value for the variables needed by the token (if you omit them, Houdini sets the default-value, which is normally zero). I changed your example to demonstrate this: Premise: [A(1,1)]G(1)[A(2,2)] Rule 1: A(i,j)=^(90)B(i,j) Rule 2: B(i,j):j>0=F(i,j)B(i/2,j/2) The "G", "^" and square brackets in the premise and rule 1 are only to separate the 2 objects. But you notice, that A is instantiated 2 times, each with different values. Houdini now sets the values of i and j to 1, when it derives the first occurance of A and the variables are set to 2, when replacing the second occurance of A. 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.