Calculate the centroid of a simplex surface?

For a closed volume part, one way to do it is to:

  1. pick a random point as guessed center
  2. calculate volume of each tetrahedron formed by the point and the triangles of the part
  3. keep a sum of the multiples of small tetrahedons’ volume and center
  4. divide the sum by the total volume

Here is an example code.

1 Like