Calculate volume of irregular triangular pyramid using differences between prisms

Jul 2018
1
0
indiana, usa
Here's a picture to better depict what I'm talking about:

volume.png

The red shape is the irregular triangular pyramid, the blue shape is the triangular prism.

All vertices of the pyramid have different z-values (except the ones shared with the prism).

I could of course calculate the volume of the pyramid and the prism independently and add them together, but I'm looking for a simpler solution that involves a "single" operation (this is for thousands of iterations of data with poorly distinguished vertices between batches; two independent volume calculations is out of the question).

Could I calculate the volume of two prisms -- one with a height at the bottom of the pyramid, one with the height at its top -- take the difference, and then operate on this "slice" of prism using the slope of a face of the pyramid to calculate the volume of that pyramid? If so, what would my formula look like (using the x, y, and z values of the pyramid's vertices)? Or could there be some other way?

Thanks!
 

SlipEternal

MHF Helper
Nov 2010
3,728
1,571
This is not a trivial problem. The methods that I would try would likely use multivariable calculus. There may be a geometric approach, but it is likely difficult to find and may not be apparent without first an investigation through calculus.