0

I'd like to compute the "volume" enclosed by a set of points in 3D space, and think the best way to do so is to triangulate/mesh the set of points.

However, for C++ at least, it seems there are only two existing implementations of surface reconstruction/triangulation from points (CGAL and PCL). Both of these implementations are bulky and give me a ton of linker errors with wrong compilations (libc++ vs libstdc++) that I have been dealing with for the past few days. (I'm running OS 10.10.)

So my question is, is there anything easier to use, preferably a simple script that just takes in points and outputs a triangulation? Or is there an easier way to extract the volume?

I think that implementing a triangulation from scratch would be too hard.

user5812696
  • 11
  • 1
  • 3
  • Are you looking to find the convex hull, and then triangulate that? – user253751 Jan 19 '16 at 21:30
  • The answers here may provide you a starting point, http://stackoverflow.com/questions/1406029/how-to-calculate-the-volume-of-a-3d-mesh-object-the-surface-of-which-is-made-up – J.J. Hakala Jan 19 '16 at 21:34
  • @immibis: No, I'm not looking for the convex hull-- the surface need not be convex. Imagine a trident for example. – user5812696 Jan 19 '16 at 21:38
  • @J.J. Hakala: I am aware that the volume can be computed trivially once you have a triangulation, but my question is asking if anyone knows of a good way to get the triangulation from a point cloud. – user5812696 Jan 19 '16 at 21:38
  • 1
    @user5812696 It might be easier to get answers to those linker problems here (like this case, http://stackoverflow.com/questions/17581777/linking-error-with-cgal ) – J.J. Hakala Jan 19 '16 at 22:09
  • 1
    If you are looking for a possibly non-convex hull (as in a trident), the problem is far from trivial. You would have to have some way of specifying a maximum point separation to bridge, and even then, problems remain. Consider a trident with large barbs on the tips, which almost touch each other. I've wrestled with this problem before and have not yet found a good general solution. – Logicrat Jan 19 '16 at 22:29
  • I've used CGAL in a mesh generator and highly recommend it, no other package comes close in my opinion. Do your points have oriented normals associated with them? One of the methods here may be what you're looking for: http://doc.cgal.org/latest/Manual/packages.html#PartMeshing. – lrm29 Jan 19 '16 at 23:33

1 Answers1

1

Right now there are 3 packages in CGAL that can help you reconstruct a surface from a point cloud:

sloriot
  • 6,070
  • 18
  • 27