Volume of irregular solid

37k Views Asked by At

I need to calculate volume of irregular solid which is having fix $200 \times 200$ width and breadth but all four points varies in depth.

Illustration

I have table which gives depth at each point.

How to calculate volume of such solid?

Hi, I am giving here my main problem definition. I have a grid with size $200 \times 200$ and the depth at each point is given in array. For $2 \times 4$ grid, below is the depth level.

And i need to find volume of such solid.

537.52, 707.52, 742.52, 719.52, 654.52

631.52, 783.52, 795.52, 764.52, 727.52

597.52, 868.52, 846.52, 793.52, 707.52

In Image i have tried to plot first grid cell.

Any help/pointer/suggestion would be real help.

I found some post related to this. But not sure which will give best result. http://tutorial.math.lamar.edu/Classes/CalcI/MoreVolume.aspx (Example 2) and link 2 answers.yahoo.com/question/index?qid=20080804220134AA8skGw

Please comment your views. Thanks a lot in advance.

3

There are 3 best solutions below

6
On BEST ANSWER

The question statement suggests that OP wants the formula for the volume of a truncated right-rectangular (actually -square) prism; however, the sample data doesn't fit this situation. ("Depths" to opposite vertices must sum to the same value, but $30+80 \neq 0 + 120$.) If we allow the table-top to have one or more creases, then OP can subdivide the square prism into triangular ones and use the formula

$$V = \frac{1}{3} A\;(a+b+c)$$

where $A$ is the volume of the triangular base, and $a$, $b$, $c$ are depths to each vertex of the base.


If the table-top really is supposed to be flat ...

Let the base $\square ABCD$ have edge length $s$, and let the depths to the vertices be $a$, $b$, $c$, $d$; let $h$ be the common sum of opposite depths: $h := a+c=b+d$. Then,

$$V = \frac{1}{2} s^2h$$

This follows from the triangular formula, but also from the fact that you can fit such a prism together with its mirror image to make a complete (non-truncated) right prism with parallel square bases. The volume of that figure $s^2h$ is twice as big as we want, because the figure contains two copies of our target.


Edit. OP comments below that the top isn't necessarily flat, and notes elsewhere that only an approximation is expected. So, let's explore the subdivided prism scenario:

As above, our base $\square ABCD$ has side $s$, and the depths to the vertices are $a$, $b$, $c$, $d$. Let $V_A$ be the volume of the truncated triangular prism over right-triangular base $\triangle BCD$; likewise, $V_B$, $V_C$, $V_D$. Then, by the triangular prism volume formula above ...

$$ V_A = \frac{1}{3} \cdot \frac{1}{2} s^2 \cdot \left(b+c+d\right) = \frac{1}{6} s^2 \left(b+c+d \right) $$ $$ V_B = \frac{1}{6} s^2 \left(a+c+d \right) \qquad V_C = \frac{1}{6} s^2 \left(a+b+d \right) \qquad V_D = \frac{1}{6} s^2 \left(a+b+c \right) $$

Now, $V_A+V_C$ is the volume of the figure where we assume the top is formed by two triangles that meet at a "crease" above diagonal $BD$; and $V_B+V_D$ is the volume when the crease appears above diagonal $AC$. (Note that one of the creases will be a "valley", and one a "ridge".) The desired volume is perhaps somewhere in between, so why not take an average?

$$V = \frac{1}{2}\left( \; (V_A+V_C) + (V_B+V_D) \; \right) = \frac{1}{12}s^2 \left( 3a+3b+3c+3d \right) = \frac{1}{4}s^2 \left( a+b+c+d \right)$$

By the way, we can get the same approximation this way: introduce a new point above the square's center, with a depth equal to the average of the depths at the vertices. Connecting that new point to the vertices creates a "fan" of triangles that approximate the top surface, and each of these triangles hovers over a quarter-square triangular base. The sum of the four triangular solids is the same as our final $V$ above.

7
On

This is a complete rewrite, for previous versions see the edit history.

From your various comments, I understand that your solid is defined by eight corners, that five sides will be flat but the top side may not, and that you are looking for an approximate solution without worrying too much about the exact shape to the top face.

One viable solution for you might be the following: if the base is a square of edge length $s$, and your heights are $h_1$ through $h_4$, then you can compute the volume as

$$V\approx s^2\frac{h_1+h_2+h_3+h_4}{4}$$

This formula will give you an exact result for the case where the top side is planar. If it is not planar, then this is probably still the best you can get without further information about the actual shape of your top surface.

3
On

It appears that @Blue and @MvG have landed on the same formula which I believe is correct. I came up with the same formula using calculus. It can be described by "Area of the base times the average height". The calculus is done by extruding a right trapezoid in the XY plane along the Z axis, where the heights of the sides are described by $y_0$ and $y_1$

$$\begin{align}y_0 &= a(z) = \Biggl(\frac{{y_a}_f - {y_a}_i}{L}\Biggr)z + {y_a}_i\\\\y_1 &= b(z) = \Biggl(\frac{{y_b}_f - {y_b}_i}{L}\Biggr)z + {y_b}_i\\\\A &= \frac{W}{2}(y_0 + y_1)\\\\&=\frac{W}{2}[a(z) + b(z)]\\\\V &= \int^L_0A(dz)\\\\&=\frac{W}{2}\int^L_0[a(z) + b(z)](dz)\\\\&NOTE: \,\,\,\, a(0) = b(0) = 0\\\\&=\frac{W}{2}\Biggl[\frac{({y_a}_f - {y_a}_i)z^2}{2L} + {y_a}_iz + \frac{({y_b}_f - {y_b}_i)z^2}{2L} + {y_b}_iz\Biggr]\\\\&= \frac{W}{2}\Biggl(\frac{z}{2L}\Biggr)\Biggl[({y_a}_f - {y_a}_i)z + 2L{y_a}_i + ({y_b}_f - {y_b}_i)z + 2L{y_b}_i\Biggr]\\\\&Evaluate\,\,\,at\,\,\,z = L\\\\&= \frac{WL^2}{4L}({y_a}_f - {y_a}_i + 2{y_a}_i + {y_b}_f - {y_b}_i + 2{y_b}_i)\\\\&= \frac{WL}{4}({y_a}_f + {y_a}_i + {y_b}_f + {y_b}_i)\\\\&=\frac{WL}{4}\sum h \\\\&\Rightarrow WL\frac{\sum h}{4}\\\\&= Area\,\,\,of\,\,\,base\,\,\,(WL)\,\,\,times\,\,\,average\,\,\,height\,\,\,\Biggl(\frac{\sum h}{4}\Biggr)\end{align}$$

Right trapezoid math figures