Doc
Doc

Reputation: 366

algorithm 3D point cloud volume calculation

I´m searching for a method to calculate the volume of a three-dimensional irregular object in either python or R. I have a time series of files (around 50 per sequence), equally spaced in time. They consist of a triangular mesh representation of the object with a fixed number of triangles. The vertices have known x,y,z-coordinates. There is no need for regenerating the mesh. And no need for visualization. The triangles have indices, the points as well. The object is not necessarily completely convex. But there are no unnecessary points. All known points are part of the hull. Now, I would like to calculate the volume of the object at each time point.

Upvotes: 2

Views: 6914

Answers (1)

Artyom
Artyom

Reputation: 1599

After some googling I found that this algorithm should do the trick for the closed mesh you are describing: iterate over all your triangles and sum up dot(v0, cross(v1, v2)) / 6 where v0, v1, and v2 are the coordinates of the triangle's vertices.

Source

Upvotes: 1

Related Questions