0

I'm looking for a way to find the centre point of a regular polygon, provided if we have the coordinates of all the vertices. searching, I have found this (Why doesn't a simple mean give the position of a centroid in a polygon?) but it discusses the two-dimensional case only. Can anyone suggest a method to find the centre of a (planar) polygon in 3D?

we will have all the vertices as follows,

 p1 = [x1, y1, z1 ]
 p2 = [x2. y2, z2 ]
 ...
 pn = [xn , yn, zn ]

N.B : I'm particularly interested in the cases of hexagons and pentagons, so for the moment I don't need a general formula. Anything that works for a hexagon and pentagon is enough.

brownser
  • 145
  • 1
  • 6
  • 4
    The average (simple mean) of the coordinates will still work in multiple dimensions when the polygon itself is planar. (The average always gives the "vertex centroid" of the polygon in any dimension. When the polygon is planar and regular, this centroid coincides with the geometric center, regardless of the "ambient" dimension.) – Blue Mar 26 '21 at 14:05
  • If the polygon is known to be regular, it's the centre of the enclosing circle, which just requires you to intersect the bisector of two diagonals (or edges). Which might be preferable if you have a high "gonality". – Joffan Mar 26 '21 at 16:09
  • If you know the values of two opposite vertices - $(x_1,y_1,z_1) and (x_2,y_2,z_2)$ leads to centroid $((x_1+X_2)/2,(y_1+y_2)/2,(z_1+z_2)/2)$ – Moti Mar 27 '21 at 02:00

0 Answers0