Not an easy problem to solve through Dynamo alone, but I think I’m pretty close. The native cross product lacing didn’t seem to achieve what I thought it was going to, so I instead created progressively smaller slices of the data:
If you have curves [C1, C2, C3, C4]
You need to compare them like this:
Distance from C1
to each of [C2, C3, C4]
Distance from C2
to each of [C3, C4]
Distance from C3
to each of [C4]
This is achieved by using List.TakeItems (to get C1, C2, C3) and ListRestOfItems (to get C2, C3, C4). After we have these, we use a decreasing range to get progressively smaller slices of the List.RestOfItems lists. So, it may initially be like this:
[C2, C3, C4]
[C2, C3, C4]
[C2, C3, C4]
but by using List.TakeItems with the range [3, 2, 1] as our input, we’re left with this:
[C2, C3, C4]
[C3, C4]
[C4]
This is much easier to do if all of the lists are the same sizes, but if they are different you just have to use a List.Count node and create different ranges for each.
In the below example, I am showing that the largest distance was found in each of the first tests for each group, pointing to curve C1 as being the farthest from one of the other curves.
Here are the distances from curve C1 to C2, C3, and C4:
By this logic, we can conclude that C1 and C2 are the most separate curves.
This graph is unfinished, as it doesn’t actually return the curves farthest from each other, but the logic is mostly there.
dist.dyn (42.4 KB)