Hi, I have a nested loop (two repeat nodes) that generates a grid of elements and I want each element in a row to depend on the previous row’s elements. So every new iteration I need to get access to the elements from previous iteration. How can I do this inside repeat or for each? Seems like it should be simple but I can’t figure out how to do it in real-time environment º～º

Related:

thanks for the answers!

I know about accumulator but I can’t figure out how to use it in this case. I need a spread of elements to generate the subsequent row, not single values. When I generate a row inside repeat region and send the result (spread [100]) to the accumulator output, I get spread [0] in the accumulator input. That’s where I’m stucked.

Post your patch.

I’m trying to recreate Wolfram’s rule 30 (smth like this https://www.youtube.com/watch?v=TT2-aXrmJ6k), not sure why it works not as intended but I will dig into this. Thank you a lot for the help!!

cool, I did not know these!

I guess you want to access the three elements above your current cell, to determine its state. Seems you won’t get around something like a kernel, means you just have to calculate the indices of the cells you want; depending on your grids X resolution.

*The corresponding formula is [left_cell XOR (central_cell OR right_cell)]*

These things are from the 80s, they use very primitive binary gates like the ones you can find on the chip itself. XOR OR AND…

ca.vl (28.1 KB)

don’t know if this already works, better not preview with ioboxes