Reordering a spread

I’ve got a list of vectors, which represent LED’s, and I have a custom order that I want to re order the spread to. I thought that a simple getslice in a foreach with the new order feeding into the getslice would work, but it’s not quite as expected.

Reorder.vl (24.9 KB)

The actual patch has 169 leds in a hexagonal grid, and I need to be able to reorder all the pixels so the output is in the correct order to my dmx channels for each one to light up correctly.

I tried my luck with hex grid points but did not find a node to switch cols/rows. If you reorder the spread to have the lines running vertical, it should do the trick!


hexagonisthebestagon.vl (31.2 KB)

Nice, yeah, I like that method of getting the hexagonal shape, I did it a bit painstakingly by using a list, that’s heaps tidier!

This is related, but not a solution, but what I would probably do, is to make them hit tested, and then go and click them in the order I want them, and save the indexes into a queue, then use that list to reorder them as you need them. Or using a linear spread for each row and then concat-ing that into to the layout, with the correct order. SometimesI think its easier to manually do things, instead of trying to make it a reusable solution ;)

2 Likes

@schlonzo We discussed this a while ago, but there are a few tricks to swapping cols and rows

A bit weird, but also achievable with this solution

hexagonisthebestagon_weird.vl (84.4 KB)

If there is no reason to make this parametric, you can also make a kind of pre-rendered lookup table

That’s a tidy solution, I always love to see how many different ways to approach and solve these problems!

Here’s a photo of the panel in production.

4 Likes