Distance measure component versus closest point component for attractor pattern

For a long time I had been using closest point component to generate attractor pattern geometry. Today I used a distance component to generate the same pattern. Now I am wondering what is the advantage of closest point component in this workflow or there is no advantage ?

ATTRACTOR PATTERN QUERY.gh (13.0 KB)

In this case, there is no advantage to using Closest Point. Just the opposite, in fact, since there is no need to search a “cloud” of points.

2 Likes

If you try to set multiple attractor points in both definitions, then you’ll see the difference.

1 Like

If you have a single attractor point, Distance is faster. About 2x speed more or less.

But if you have multiple attractor points:


Closest Point is way faster. (With Distance you would need to rebuild the logic)
Also you will have the algorithm structure that can swap easily to Surface/Brep/Mesh closest point component…

2 Likes

True, but in that case the cloud would be the list of attractor points.

1 Like

Check the difference.

ATTRACTOR PATTERN QUERY_re.gh (10.7 KB)

2 Likes

Thanks. Now I understand.