copy stamp the L-system rules (turtle randomizing)?

   4879   3   1
User Avatar
Member
60 posts
Joined: 7月 2005
Offline
Hey there,

This might be a silly question

It looks as if variables (for “Stamping”) from a copy sop can't be used in the “rules” of an L-system.

can they?

I would love to be able to randomize my copies of an l-system on a template geometry on a “turtle/rule” level.
No problem “stamping” things like “generations”.
Doesn't look like it can be done to the “rules” though.

Thanks

Jim Ellis
Jim Ellis
www.emsh.calarts.edu/~jim
User Avatar
Member
4271 posts
Joined: 7月 2005
Offline
It works, you just have to work around the fact that Copy Stamping with the Copy SOP only supports numbers and not strings.

So you'll need an expression in your rule that looks like this


`{

if (stamp(“../copy1”,“test”,0)<10) {
return “FFFA”;
} else {
return “FFAA”;
}

}`


Hopefully, one day SESI will add some string coyp stamping parameters to the Copy SOP. (There already is a stamps() expression for string….)
if(coffees<2,round(float),float)
User Avatar
Member
321 posts
Joined: 7月 2005
Offline
Wolfwood
It works, you just have to work around the fact that Copy Stamping with the Copy SOP only supports numbers and not strings.

So you'll need an expression in your rule that looks like this


`{

if (stamp(“../copy1”,“test”,0)<10) {
return “FFFA”;
} else {
return “FFAA”;
}

}`


Or you could make a variable, or list of variables that contain separated strings, e.g. “F A”, and then

`arg($myVar, stamp(“../copy1”, “test”, 0))`


i.e. use the stamp value as an array index value.
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
User Avatar
Member
60 posts
Joined: 7月 2005
Offline
Yeah I was afraid that the Copy sop didn't use strings,
but it was funny because I didn't get an error flag in either the “Copy” or the “Lystem”…
and with either of those, you cant just click next to the parameter value and see your input/output data.

But what both you guys suggested works wonderfully!
Thanks so much!
Antoine's seems to be exactly what I'm after…
and sick/amazing things are starting to happen.

Jim Ellis
www.emsh.calarts.edu/~jim
  • Quick Links