# Connecting 2 set of points one by one

## Recommended Posts

Hello,

I have an issue connecting two sets of points the way I want.

As it can be seen in the screenshot, I have two groups of points, one along a square and an other along a smaller square.

They each have exactly the same amount of points and I want each of the point from the bigger square to be connected to one point of the smaller square.

Any help is appreciated.

Thx.

##### Share on other sites

It depends on whether the pairing information exists or not.

In your case, it's trivial because each point should be connected to another point which point number  is equal to @ptnum+27

Use: Add SOP / Polygons / By Group /  Skip Every Nth point / set N to 27

If  the pairing information is gone, then it's more work. It would be something like sorting each set of points with respect to their angle (see atan2) relative the centroid, then find the pairing shift  (see sort / Point sort / shift) which will minimize the overall edge length.

##### Share on other sites
Posted (edited)

Hi
Here's another solution independent of the order of the points. But your sets of points, at some point, has to be connected. I guess at first they did.
This solution is a mix of a tuto from entagma and another one another one from Junichiro Horikawa here.
It's about connecting two (or more) groups of points according to distance.

there are two sets of groups, one created with the group sop, the other created with VEX.
Both are not necessary, but I was experimenting with different methods.

Edited by flcc

## Create an account

Register a new account