[Math] Volume of n-dimensional solid w/ n-1 dimensional simplex as a base

geometry

Background

On an old MathForm discussion site I came across a very interesting method, which can find the center of mass of an n-dimensional solid, with an n-1 dimensional unit simplex as a base.

To ground this problem a 3D version of such a solid looks like the following:

enter image description here

Where the base is just a triangle with each side = 1 and the "vertical" sides stand orthogonal to the base.

In Mathematica code the method as presented looks like this:

h = {3, 4, 2};  (* heights at right angles to the base simplex *)
n = Length[h];

A = Transpose[Prepend[#, 03]&/@CholeskyDecomposition[(IdentityMatrix[n - 1] + 1)/2]];

((h/Total[h] + 1)/(1 + n)) . A

enter image description here

For some further insight into this, the matrix "A" used in the dot product calculation looks like this:

enter image description here

One of the contributors to the old site described this approach as, "finding moments e.g. averaging a coordinate over the object (which is what you do, in effect, to find the center of mass)."

The guy who came up with this appears to have found a formulation that does exactly that, and avoiding integration. It has a couple of distinct advantages over other methods:

  • being very fast to calculate (at least in Mathematica) and
  • it can handle any number of dimensions.

Questions

I need a similar fast method to calculate the volume of precisely these kinds of n-dimensional solids.

The approach to finding the center of mass seems promising, but I'm not familiar enough with the ideas behind it to work it all out by myself. I keep taking the pieces of this approach apart trying to understand it more clearly, but can't think of a way through it.

Breaking down the problem into more manageable parts might help. Wikipedia shows a formula to calculate the volume of a regular n dimensional simplex with unit side length as:

enter image description here

This leaves figuring out how to calculate the orthogonal "cap".

The Cholesky decomposition approach does seem promising. I wondered if anyone had some insight into how to apply this (or an equally speedy) approach to calculating the volumes of such solids?


Additional information that might lead to a simpler solution:

Some discussion around the original MathForum question suggested that one could calculate the volume of the kinds of solids described above by taking the hyperarea of the base and multiplying it by the average of the heights.

Wolfram Alpha provides a formula for calculating the "hyper-surface area" of a simplex:

Wolfram Alpha hyper-surface area of a simplex

As I only need this for a unit simplex (all sides = 1), I think this simplifies to:

enter image description here

Symbolically, in Mathematica code, for n=3 with a base simplex of n-1 dimensions it looks like this:

hyperarea[n_] := Sqrt[(2^(1 - n) *n)] *(n + 1) * 1^(n - 1) / (n-1)! 

heights = {h1, h2, h3};
hyperarea[n]* Mean@heights

enter image description here

Plug in some simple values for the heights:

heights = {1, 2, 3};
n = Length[heights];
N[hyperarea[n]* Mean@heights]

3.4641

BUT, this does not seem to work correctly.

Take a simple example of this kind of solid, a prism with equilateral triangle for the base and top and all edges = 1. Its volume should equal:

(1^2) * Sqrt[3]/4 * 1 = 0.433013

But when I use the hyperarea approach with heights {1, 1, 1}, I get 1.73205.

Any thoughts and guidance on what I've missed appreciated.

Apologies for all the edits.

Best Answer

I struggled with this one, but it finally became clear. I hope this answer helps someone else along the way.

The comment around the original MathForum question that suggested that one could calculate the volume of the kinds of solids described above by taking the hyperarea of the base and multiplying it by the average of the heights, while technically on the mark, its wording sent me down the wrong road.

To find the volume of these kinds of solids one needs to multiply the volume formula for a regular simplex (also shown in the original post):

enter image description here

times the average of the heights of the cap.

Calculating a solid with 3 heights to the cap will need a 2 dimensional regular simplex as a base (an equilateral triangle). In this case the formula for the volume of a regular simplex will give the triangle's area, hence the confusion about hyperarea.

When calculating for heights of n dimensions, the base simplex will have n-1 dimensions.

So, a little Mathematica function will do the trick:

volSimplexWithHyperCap[heights_List] := Module[{n, simplexVolume},
  n = Length[heights] - 1;
  simplexVolume = Sqrt[n + 1]/(n! * Sqrt[2^(n)]);
  N[simplexVolume * Mean[heights]]]

volSimplexWithHyperCap[3, {1, 1, 1}]

0.433013

This corresponds correctly to the prism volume in the question. It also, readily extends to higher dimensions:

volSimplexWithHyperCap[{1, 3, 2, 3, 5}]
0.0652186

This has the advantage over integration of being relatively simple and very fast to calculate. Not a Cholesky decomposition solution like I imagined at first, but it looks serviceable.

Maybe @MvG will think of a proof.

Thanks to everyone for their patients with all the edits.

Related Question