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


#1

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


(Amir Habibi) #2

Hope i got what you wanted

Closest Point.gh (6.0 KB)


(Amir Habibi) #3

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


#4

No, I don’t understand what you’re doing. Please elaborate your procedure.


(Amir Habibi) #5

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


#6

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.


(Aris Nikolopoulos) #7

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)


#8

If I understand your description correctly, then you can do as the attached…

Closest Pair_re.gh (11.9 KB)


#9

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)


(Aris Nikolopoulos) #10

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