简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM