This formula can be applied to polyhedra with arbitrary faces since faces having more than three vertices can be triangulated. Furthermore, the formula applies to concave polyhedra as well as convex ones.
The volume can also be computed using the divergence theorem by integrating the function , which has divergence everywhere, over the triangulated
faces of the polyhedron.
Dobrovolskis, A. R. "Inertia of Any Polyhedron." Icarus124, 698-704, 1996.Lawlor, O. "Boundary Integration
and the Rotational Inertia Matrix." CS 482 Lecture. https://www.cs.uaf.edu/2015/spring/cs482/lecture/02_20_boundary.html.Mirtich,
B. "Fast and Accurate Computation of Polyhedral Mass Properties." J.
Graphics Tools1, No. 2, 31-50, Feb. 1996.Nürnberg,
R. "Calculating the Area and Centroid of a Polygon in 2D." 2013. https://www.ma.imperial.ac.uk/~rn/centroid.pdf.