Let the points be v0, v1, ..., vN in counterclockwise, where vi = (xi, yi, zi).
Then the triplets (v0, v1, v2), (v0, v2, v3), ..., (v0, vi, vi+1), ..., (v0, vN-1, vN) forms N-1 triangles that create the polygon.
The area of each triangle is | (vi − v0) × (vi+1 − v0) | ÷ 2, where × is the cross product and | · | is vector length.
You may need to make the area negative to compensate for concave parts. A simple check is to compute (vi − v0) × (vi+1 − v0) · (v1 − v0) × (v2 − v0). The area should have the same sign as the result.
Since ratio of area of 2D figures is constant under parallel projection, you may want to choose a unit vector (e.g. z) not parallel to the plane, the treat (vi − v0) × (vi+1 − v0) · z as the area. With this, you don't need to perform the expensive square root, and the sign check is automatically taken care of.
The centroid of each triangle is (v0 + vi + vi+1) ÷ 3.
Hence, the centroid of the whole polygon is, assuming uniform density,
1 N-1
centroid = —————————— ∑ ( centroid-of-triangle-i × area-of-triangle-i )
total-area i=1
(For dimensions ≥ 4D, the area needs to be computed with Ai = ½ |vi−v0| |vi+1−v0| sin θi, where cos θi = (vi−v0) · (vi+1−v0). )