How can I calculate volume from scattered points?

13 views (last 30 days)
I will pay a lot if someone can help me with this! I need this quickly (I hope this doesn't go against the rules of the forum)
I need to take a txt file with XYZ coordinates of a worn down sphere and find the volume between a hypothetical superimposed sphere and this sphere to calculate volume lost.
To better explain, here is a picture of my mesh of points that I have loaded from my txt document, and I ran the delaunay command to make a surface mesh and so far I have this: http://i778.photobucket.com/albums/yy64/w2wgamer/Research/Untitled-1-1.jpg
And for the Volume I need to calculate, I made a quick picture to get the idea, it's in 2d: http://i778.photobucket.com/albums/yy64/w2wgamer/Research/Volume.jpg
I need to be able to put in the formula for a sphere that is bigger than the sphere measured, and have it calculate the volume in between. I will seriously pay to have someone help me, I am kinda desperate at this point. Thank you so much!!

Accepted Answer

Sven
Sven on 9 Jul 2012
Hi Daniel,
From your picture, it seems that your points are all centered around the [0 0 0] coordinate (and even if they were a little off, I'm sure it would be possible to shift them to ensure this).
So if you were to convert your coordinates to spherical coordinates:
[TH,PHI,R] = cart2sph(x,y,z)
The final output, R, would give the radius of the ball at that point. A perfect sphere would have all points with the same radius. An imperfect (or not properly centered) sphere will have variation.
Your formula for the sphere that covers all the points will simply be determined by max( R ) as:
bigVol = (4/3) * pi * max(R)^3
Perhaps one way to approach the question of deviation from that perfect sphere is to:
  1. Get an estimation of "percentage of the sphere's surface" that is represented by each coordinate you have. This would be done by some form of Delaunay Triangulation of the points (probably best to use the TH, PHI spherical coords)
  2. Calculate the volume of that tiny chunk of the sphere via its R radius
  3. Sum up all the tiny chunks of volumes and compare them to bigVol (keep in mind that it seems you're working with a hemisphere rather than a sphere?)
  1 Comment
Daniel Sufficool
Daniel Sufficool on 9 Jul 2012
Thanks again Sven! I came to the same conclusion and tried this out, but unfortunately it didn't work to the accuracy that I needed it to. But I am hoping the other method you helped me with in my other post will give me a good chance at solving this!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!