3

I need to come up with a mathematical equation to find the volume given any 20 points. I believe that the created shape will be a Pyritohedron.

I have spent a lot of time researching and I am not sure what to do. It is very hard to visualize. Thanks!

  • 2
    Do you mean the volume of the convex hull of those 20 points? The volume of 20 points is obviously just zero. – Rory Daulton Nov 27 '16 at 22:35
  • Rory, Yes I mean the volume of the convex hull. I am currently plugging those 20 points into this algorithm https://gist.github.com/tixxit/242402#file-hull-py-L4. I now have the points that make up the convex hull. How should I calculate the volume from here? Thank you. – Russell Ratcliffe Nov 28 '16 at 00:14
  • 2
    That algorithm you linked to is for the *two-dimensional* convex hull of points *in the plane*. The algorithm for a 3d convex hull is much more complicated, and I have never studied it. The difficult part of your problem is finding the faces of the convex hull of your 20 points. If you are given that, the volume can be found by adding the volumes of the pyramids from each face to any point in the interior. If you are just given the points in random order, you need to find those faces. – Rory Daulton Nov 28 '16 at 00:25

1 Answers1

2

See the earlier SE question, "How to find convex hull in a 3 dimensional space." Once you have the convex hull, with triangular faces (faces with more than three sides can be partitioned into triangles), then it is easy to find the volume by adding up tetrahedra volumes: Fix a point x, and form a tetrahedron T from x and a triangle face F. This is explained in Computational Geometry in C, p.131, among many other places. This is equivalent to Rory Daulton's pyramids.

Community
  • 1
  • 1
Joseph O'Rourke
  • 4,346
  • 16
  • 25
  • 1
    Another way to do it would be to use Green's function to convert the volume integral to a surface integral and use quadrature on the surface triangles. – duffymo Nov 28 '16 at 10:15