A vertical prism has a polygonal base and is truncated by an arbitrary plane. I need to compute its volume knowing the $xyz$ coordinates of the vertices.
In the case of a triangular prism, the volume is given by $A\bar h$ where $A$ is the area of the base and $\bar h$ the arithmetic mean of the heights of the vertices.
The formula can still be written as A$\bar h$ in the case of a polygonal base, where $A$ can be evaluated by the shoelace formula. But what is $\bar h$ in this case (height at the centroid of the vertices/edges/area, some other weighted average of the heights) ?
I know that I can triangulate the base and sum the triangular prisms, but I was wondering if there is a shortcut.