Calculating the volume of a vessel¶
As we have seen, the simplest method for calculating the volume of a solid of revolution is by dividing the rotating shape into smaller pieces.
This method has however one major flaw that limits its adoption for archaeological purposes, namely it cannot be used to calculate the capacity of a vessel that has a convex interior surface.
For this reason, Kotyle uses a more advanced technique, based on Pappus’s centroid theorem.
Pappus’s centroid theorem¶
In mathematics, Pappus’s centroid theorem is either of two related theorems dealing with the surface areas and volumes of surfaces and solids of revolution.
The second theorem states that the volume V of a solid of revolution generated by rotating a plane figure F about an external axis is equal to the product of the area A of F and the distance d traveled by its geometric centroid.
For more details, see Wikipedia (which is also the source for the two paragraphs above).
Implementing Pappus’s centroid theorem¶
According to the above definition, the required data to compute the volume are:
the area of the plane figure
the distance of its centroid from the rotation axis
Both geometric operations are not trivial for non-standard polygons, so we use the Shapely Python library to perform them. Shapely can be easily integrated with Matplotlib to plot both the profile and the geometric centroid.