# One single point which is closest to its vertices of irregular polygon

I draw an irregular polygon. How can I find one single point which is closest to its vertices?

Hope i got what you wanted

Closest Point.gh (6.0 KB)

This is the internalised def
Closest Point.gh (6.4 KB)

You have extracted one of your polygonâ€™s vertices , and from a bunch of points you want to find the one wich is closest to your verticy , thatâ€™s it

I select the polygon for curve, I place points on its vertices. Then I bake the closest point output. Nothing is shown. Please give step by step method.

from what you say I understand that you want one of two things:

1. you have a polygon and a point, and you want to find which of the polygonâ€™s vertices is closer to your point
2. you have a polygon, and you want to find a point which by average is closer to all of the polygonâ€™s vertices (in other words, itâ€™s centroid)

closest.gh (11.1 KB)

If I understand your description correctly, then you can do as the attachedâ€¦

Closest Pair_re.gh (11.9 KB)

2 Likes

The sum of distances between vertices and â€ścenter pointâ€ť is usually less using Average of the points than using their Area (Centroid).

avr_2018Feb16a.gh (14.9 KB)

1 Like

I was sure it was the centroid! thanks for correcting me!