# Create edges for a set of vertices with Geometry Nodes

I have a collection of vertices and I want to connect some of them by edges. I need to compare any possible pair of vertices and their attributes to decide, whether they should be connected.

How can I facilitate an operation acting on every possible pair of points/vertices of the geometry?

Would it be helpful to have an exact copy of the geometry?

I basically need to get a pair of indices, such that I can extrude one vertex into the direction of the other, once the pair is selected by some selection function.

Further information: The vertices that are displayed on the screen are actually points that live in an eight-dimensional space. The full eight-dimensional coordinates are stored inside the attributes associated to every vertex. Whether two vertices are connected by a line depends on the distance of these vertices in the eight-dimensional space.

I want to go over each pair of vertices, evaluate there distances in eight-dimensions (just applying a function to the attributes of the pair). Depending on this evaluation an edge will be extruded between the pair of vertices.

• " I need to compare any two pairs of vertices" - two pairs, or one pair = two verts? Can you describe why you need this to avoid an XY problem? Commented Jul 11 at 14:51
• I changed the typo. Of course only one pair of verts. What do you mean with "XY problem"? Commented Jul 11 at 15:02
• en.wikipedia.org/wiki/XY_problem Commented Jul 11 at 15:05

This setup connects pairs of vertices, which sums of indices are divisible by $$8$$: