POLYGONCENTROID3D Centroid (or center of mass) of a polygon.

   PTC = polygonCentroid3d(POLY)
   Computes center of mass of a polygon defined by POLY. POLY is a N-by-3
   array of double containing coordinates of polygon vertices.

   PTC = polygonCentroid3d(VX, VY, VZ)
   Specifies vertex coordinates as three separate arrays.

   Example
     % compute centroid of a basic polygon
     poly = [0 0 0; 10 0 10;10 10 20;0 10 10];
     centro = polygonCentroid3d(poly)
     centro =
         5.0000    5.0000    10.0000

   See also
   polygons3d, polygonArea3d, polygonCentroid

Package: matgeom