# Calculating the volume of a triangular mesh?

I have an unorganized point cloud with a bunch of 3d points. I use a certain surface reconstruction method to obtain a triangle mesh of the underlying surface. The surface could be closed or not. Can somebody point me out to how I would go about estimating the volume enclosed by such a surface (if its closed). If its not closed, then what would a way to "close" it and get a volume? I would appreciate if somebody could even point out C++ libraries that would help me do this.

-
This is maybe already answered on StackOverflow. – Libor Feb 15 '13 at 14:43
Thanks Libor, that was helpful. Could I keep this question alive to see if I get answers to the second part of my question? The thread mentioned before doesn't deal with surface that are not closed. What are my options in such a case ? – Mustafa Feb 15 '13 at 17:42
This is an interesting problem for geometry and graph theory. I am sure there is a simple iterative algorithm for closing the holes or maybe just improvement of your algorithm that does not introduce the holes. I have a feeling the problem can be defined in 2D as well. Posting such problems in simpler and well defined form on math.stackexchange.com helped me a lot several times. – Libor Feb 15 '13 at 18:06
If the first part of your question is answered by StackOverflow, link to SO and then remove that part from the question, so this is just about the second part. – endolith Apr 3 '13 at 13:55