How can one calculate the hypervolume of a convex n-dimensional polyhedron given the coordinates of its...
geometry/polytope.volume New
New entry, edited from material collected for the archive and not yet in a released version.
Problem
How can one calculate the hypervolume of a convex n-dimensional polyhedron given the coordinates of its extremal points?
Show solution
I can give a full and complete answer to this question.
n
Working in R , let v , i=1,...N be points in this vector space. N >= n
i
v = {x , x ,x , ... x }
i 0i 1i 2i ni
Assume that this set of points forms a convex hull.
Then the volume of the hull is:
|v |
| 1|
| |
|v |
| 2|
| |
1/N! dyad |v |
| 3|
| |
|. |
|. |
|v |
| N|
This is a dyadic tensor, not a determinant since the matrix above may
not be square. As an example let n=2, N=3 (a triangle) with the following
points:
(1,0), (3,0), (2,4). The area is then:
1/2! dyad( (1,0), (3,0), (2,4)).
To find the dyadic in two space write down:
1 0
3 0
2 4
1 0
The fourth row is formed by adding the top one at the bottom. Add up the
diagonal products (1*0 + 3*4 + 2*0) subtract the other diagonals and
divide by 2!.
It works the same in n dimensions except one needs generalized dyadics,
not 2D.
-- Bob Silverman, in reply to Renwill Yang <ryang@watdcsu.waterloo.edu>
[ Editor: the example divides by 2! = n!, not by N! = 3! as in the
general formula; with 2! it gives the correct area,
((0 + 12 + 0) - (0 + 0 + 4))/2 = 4. ]