# How to measure the volume of rock?

I have a object which is similar to the shape of irregular rock like this

I would like to find the volume of this. How to do it?

If I have to find the volume, what are the things I would need. eg., If it is cylindrical, I would measure length and diameter. But, it is irregularly shaped. Like the above rock.

Where should I start? Couple of google search says something related to integration and contours. Somebody pls give me some handle :) I would say i'm very beginner level in math.

Many Thanks :)

Edit: 60 to 70% accuracy would be helpful.

-
You could always use Archimedes' solution: submerge it in water, and measure the volume of water displaced. – Nate Eldredge Jul 31 '12 at 14:14
For something as irregular as your example rock, I think Nate's solution is the only sensible one. – Old John Jul 31 '12 at 14:15
The object is tumor inside the stomach. @Qiaochu Yuan a 3D angiogram – Prince Ashitaka Jul 31 '12 at 14:26
Here is Volume 1 – draks ... Jul 31 '12 at 14:28
What kind of measuring tools do you have then? I assume you can see it in fair detail if you're comparing it to the rock. How do you know the shape/rough size of it in the first place? – Robert Mastragostino Jul 31 '12 at 14:29

As your comment indicates, you're not interested in rocks so much as tumors.

One possible approach is to use a tomographic technique. Many medical imaging tools image the body using tomography: that is, examining the body one "slice" at a time.

If you have access to such tools, or can derive such an example, then what you want to do is cut the rock/tumor into many slices along some axis, and then compute the area of the tumor at that slice. This is a bit easier to do that doing it in three dimensions.

Then, you move forward by some $\Delta z$ along the $z$-axis (or whatever axis), and repeat.

Multiply each surface area by $\Delta z$, sum them, and you will get a good estimate. The estimate is better the smaller your $\Delta z$.

To compute the area of each "slice", you can do many things: fit a simpler shape to the data, perform Monte Carlo integration, or decompose the shape into a series of piecewise linear segments.

-
"To compute the area of each 'slice'..." - here is a related thread. Slicing the mass finely is an excellent strategy. Otherwise, one might consider a tetrahedralization... – J. M. Jul 31 '12 at 16:34
I think typically the slices from tomographies are digital images consisting of pixels. In that case determining the size is easy: Just count all the pixels which belong to the tumor in all the slices, and multiply this with the area each pixel covers in each slice, and with the distance between slices. – celtschk Jul 31 '12 at 18:15
@celtschk Good point. If you have a digital image, you can use a simple threshold method to get the "area". A simple MATLAB script could be something like length(find(IMG > thresh))/prod(size(a)). – Arkamis Jul 31 '12 at 18:22

If you don't want to use Archimedes' solution, and you know the material, you can look up the density and weigh the rock.

-

The easiest way (if you have a 3d model) is simple Monte Carlo integration. One builds a big bounding box around the "rock", and then randomly chooses a large number of points inside the box. The ratio of points inside the "rock" to the the number of total points, is the ratio of volumes. Since you can easily calculate the box's volume, you now also know the volume of the rock.

The task of finding whether or not a point is inside the rock is in general complex, but is simplified if you can assume that the rock is convex. In that case, you test each triangle that belongs to your 3D mesh: if the point is in the right side for all triangles, the point is inside.

-
There is an easier method for a 3D mesh (see my answer). – mcb Sep 16 '13 at 22:29

There is a very simple and elegant algorithm for calculating the volume of an arbitrary, closed mesh described in this paper (Zhang, Cha, and Tsuhan Chen. "Efficient feature extraction for 2D/3D objects in mesh representation." Image Processing, 2001. Proceedings. 2001 International Conference on. Vol. 3. IEEE, 2001. Page 2). The trick is to base a tetrahedron on each triangle and top it off at the origin and then sum up all volumes, signed by whether the triangle faces the origin.

-

## protected by Community♦Nov 3 at 0:32

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.