Translate every other point in a list

Hi all

I have a list of points and I want to move only every other.

How I do modify only every other item of a list while keeping the rest of items unchanged?


Is it something like this you want?

1 Like

Hi @franciscusm


Thanks both, very useful indeed and works!

But actually I’ve realized I need something a bit more complex: the engineers are providing with a greyscale image that shows stress in a brickwork wall. And I’m doing brick patterns based on those stresses.

So I made a brick family and Dynamo graph to read that greyscale image and place a brick (or not), assign an offset from the wall, etc. according to the brightness of each point in the image.

However I’d need to translate every row of bricks, instead of every other item (thus every other group of 26 itmems). So the bricks overlap properly.

Maybe List.Chop using the number of points per row, I’ll try this. EDIT: yes, that works

And going further away ideally I would like to control the spacing between the bricks to produce smooth transitions between gap sizes and create smooth patterns accordingly to the smooth greyscale images. But first I need to figure out the formulas for this by playing with the number of bricks and distribute the spacing smoothly between them matching the greyscale image… but that’s another story.