There are formulas for many basic shapes, but that doesn't solve the problem for shapes that cannot be subdivided into those.
The analytical way to calculate volumes is to use a defined integral over whichever functions define the borders of that space.
This only works when it is actually possible to define those functions, but even then it can be a very difficult process that can take more time than the maximum required.
To avoid this problem, whether the functions are known or there are measurements of the surfaces that limit the volume, there are computational methods that result in an approximation, to the volume, with arbitrary precision, which is all that is needed in practice.
Chat with our AI personalities