Can irregular polygons with unique vertices be guaranteed of a unique center point? Formula?

189 Views Asked by At

To visualize this, I've created the following diagram.
enter image description here
I have sets of 80 numbers each. Here, just to draw it easily, I'm showing them as sets of 12 numbers each. The sets S1 and S2. Each set can contain 12 numbers ranging from 1 to 10, and the order of the number in the set matters. i.e. {1,2,3} is not the same as {1,3,2}.
In 2D space, there are 10 concentric circles as shown by the dotted lines in the image. Each circle represents the possible values that can be contained in a set. Each of the straight lines jutting out of the center of the image, represents the position of each number in the set, starting from the "start" line. So since S1 has 3 as the first number, the first red dot is placed on the third concentric circle at the start line. Moving counter-clockwise, the next number is 7, which gets placed on the next line at circle 7 and so on.
Circles placed as such, form the red and green polygons shown in the image.

Question:
I want to find a unique center point for each such polygon formed by any such set containing 12 numbers where the numbers may be generated randomly. I've placed a red and green plus point for what I'd assume might be the approximate centers of the polygons.

  • I'm not particular about whether only the vertices of the polygon are considered for finding the center or whether the sides of the polygon are also considered.
  • I'm also not particular about whether the center point lies within
    the polygon or not.

I just want to ensure that each unique polygon should definitely have a unique center point on the given 2D space. Is there a formula to calculate it and is it possible to ensure a unique point? Do remember that I'll eventually be using sets of 80 numbers each, containing numbers ranging from 1 to 10.
I've seen the centroid formulae and this, but I'm not sure if they'd mathematically ensure unique center points.

1

There are 1 best solutions below

5
On

For simplicity, I would use the centroid of a finite number of points, which is simply calculating the arithmetic mean of each coordinate. This is as if you have an equal weight at each of the points, and then find the balancing point. This is simple to implement without errors.

The other formulations you link to assume the weight is uniformly distributed across the whole area of the polygon. That will (if implemented correctly, and if given the vertices in order around the polygon) also give a uniquely determined centroid, but is slightly different to the above, and I see no reason why it would be preferred over the simpler one.

Note that as pointed out in the comments, there will always be distinct polygons that have the same centroid. There will be many that have the centroid in the origin (e.g. any polygon with rotational symmetry). There are also ones with matching centroids that are not in the origin, but those will be much rarer. However, given that you are using 80-gons, each vertex with 10 possible values, the probability of getting matching centroids is very small.