[PD] accessing i variable in repeat object?
Claude Heiland-Allen
claudiusmaximus at goto10.org
Fri Aug 8 12:06:30 CEST 2008
Frank Barknecht wrote:
> Hallo,
> punchik punchik hat gesagt: // punchik punchik wrote:
>
>> is it possible to access to the increment variable in repeat? when i repeat a geo in gem having access to the "i " variable allows me creating diferent 3d patterns....
>>
>> how can i do something like this with repeat?
>>
>>
>> for (i = 0; i = 10 ; i ++) {
use [f]X[+ 1] like frank said below, but see my comments there..
>> if (i%5 ==0 continue;
use [spigot] for this part
>> cube
>> translate (i * 2) 0 0;
>> }
>
> You just put a trigger after the repeat and start counting. E.g.
>
I'd put a [t a b] here...
> [repeat 10]
> |
> [t a b]
> | |
...connected to "0" that resets the [f]
> | [f ]X[+ 1] <= "i"
then for the continue stuff it would be
| [t f f]
> | |
> | [mod 5]
> | |
| [!= 0]
| |
[spigot]
| (from [t f f])
| |
> [translateXYZ]
>
> Ciao
Hope this makes sense,
Claude
--
http://claudiusmaximus.goto10.org
More information about the Pd-list
mailing list