Formula to find volume of a rectangular solid

1. Apr 1, 2015

beamthegreat

Hi all,

I need help finding a formula to find the volume of a solid that has a fixed width and depth but 4 different heights. To see what I mean, please take a look at a sketch I drew below.

Thanks.

2. Apr 1, 2015

da_nang

Since the top vertices aren't in the same plane, there is no obvious answer. It will likely depend on the shape of the top face.

3. Apr 1, 2015

beamthegreat

The top vertices has a rectangular shape and the dimension is 2x3. To clarify, the width of this solid is 2 and the the depth is 3. Meaning all angles on the top vertices are perpendicular to each other.

4. Apr 1, 2015

abbas_majidi

You can get one of the corners of 2×3 face as origin of 3D coordinate and it's face(contain origin and 2×3) must be in x-y plate. Now you must find equation of face which is above of x-y plate (another 2×3 face) in form z=f(x,y) and calculate integral of f in 2 dimension x&y from 0<x<2 and 0<y<3. answer of integral will be volume of solid.

5. Apr 1, 2015

da_nang

By shape, I meant how the z-value of the top face changes wrt the domain bounded by the top face.

6. Apr 1, 2015

beamthegreat

All angles are perpendicular to each other with the exception of the lower vertices. If you cover the bottom of this solid, it would look exactly like a rectangular prism.

Another way to put it is that if the height were all the same, eg.) 1.2, you could calculate the volume by multiplying 2 x 3 x 1.2

7. Apr 1, 2015

Staff: Mentor

One way to get the volume is to use the calculus technique of integration. To simplify matters I would turn the thing over so that the bottom is flat. Using the (now) top vertices, I would find the equation of the plane that represents the top face. Assuming that the plane of the top surface is defined by z = ax + by + c, the integral would look like this:
$$\int_{x = 0}^2 \int_{y = 0}^3 ax + by + c~dy~dx$$

8. Apr 1, 2015

da_nang

I've attached an example image of what I mean. The model is the same as the one in your image. Notice the drastic change of color on the top face? That's because the quadrilateral polygon is made up of two triangles. If the polygon was planar, the triangles would be in the same plane and there'd be no change in color. Now I can also choose to retriangularize the polygon so the common edge of the triangles runs between the two other vertices. It would hence look differently and possibly have a different volume. So it's important to know the function z=f(x,y) that describes this top face since it's clearly not planar.

Now I don't know what you mean by angles being perpendicular to each other. I've checked the angles for each pair of adjacent edges and if the edges are straight then no pair is at a right angle. Check it yourself by calculating the vectors for each edge and taking the dot product.

File size:
16.6 KB
Views:
131
9. Apr 1, 2015

beamthegreat

Thanks but how do I find the equation of the plane that represents the top face?

10. Apr 1, 2015

beamthegreat

Wow, first off thank you for taking the time to write this response. I haven't really thought it out that far. Basically, what I'm trying to do is to estimate the volume of a pit excavation site by measuring all 4 sides of the pit. How do you suggest I find an estimation of the volume of this pit?

11. Apr 1, 2015

da_nang

It's a surface, but it's not a plane.

For any two points in a plane defined by the equation $a x + b y + c z + d = 0$, the equation $a \Delta x + b \Delta y + c\Delta z = 0$ must apply, where $\Delta x$ represents the difference in x-coordinates and so on. This doesn't apply to the top face in question, since two opposite and parallel edges of equal lengths have different $\Delta z$.

12. Apr 1, 2015

Staff: Mentor

You have the coordinates of all four vertex points on the top face. Label these points A, B, C, and D (where A and C are opposite vertices, and B and D are opposite vertices).

Form two vectors, $\vec{AB}$ and $\vec{AD}$.
Find the cross product of these vectors and call it $\vec{n}$. This will be a vector that is perpendicular to (normal to) the plane of the top face.
Take any of the four vertices, say $A = (x_a, y_a, z_a)$.
Let P(x, y, z) be any point on the top plane. Then the equation of the plane is given by: $\vec{PA} \cdot \vec{n} = 0$.

Edit: I've assumed that the top surface is a plane, but as da_nang points out, that might not be the case. The vertical sides of the box have to be specific lengths in order for the top surface to be planar.

13. Apr 1, 2015

da_nang

Well if you don't have any information on the interior then the best I think you can do without further information is to fit a plane to those coordinates and hope it doesn't vary too much from reality. Least-squares might do. After that, you use this approximation in the integral given by Mark44.

14. Apr 1, 2015

beamthegreat

If its not too much to ask, can you quickly do the calculation needed to find the volume of this solid so I can have something to refer to? Thanks!

15. Apr 1, 2015

Staff: Mentor

Why don't you give it a shot, and we'll take a look at what you did?

16. Apr 1, 2015

SteamKing

Staff Emeritus
There's no explicit formula to calculate the volume of such a solid, and using integral calculus and a hefty dose of analytic geometry seems to be a bit much to figure the volume of a hole.

A quick and dirty estimate of the volume can be made by calculating the areas of the ends of the excavation. These are trapezoids with a width of 2 units each. The heights indicated on your diagram are the lengths of the sides of each trapezoid:

http://www.mathopenref.com/trapezoidarea.html

Let's call these areas A1 and A2. The volume can be calculated using the trapezoidal rule and will be:

V ≈ (1/2) * Length * (A1 + A2) cubic units

Here, Length = 3 units

If you need something a little more accurate, you can calculate the area of a section of the excavation in the middle and use Simpson's First Rule, but the trapezoidal rule should give you a sufficiently accurate result for most purposes.

17. Apr 1, 2015

beamthegreat

Thank you, SteamKing! This is exactly what I needed.

18. Apr 1, 2015

PeroK

If you take x going from 0 to 3, you could consider the cross-sectional area as a function of x. You have a common width of 2 and a variable height (varying linearly on each side). $h_1$ on the left, and $h_2$ on the right.

$A(x) = \frac{1}{2}(2)(h_1 + h_2) = h_1 + h_2$

You could integrate this for x from 0 to 3, or (as it's linear) just take the averages of the h's and multiply by 3.

This gives $V = 3(1.35 + 1.35) = 8.1$

Am I missing something?

19. Apr 8, 2015

PeroK

I thought it was worth posting the general solution here. If the solid has width $w$, length $l$, heights $a, b$ at the front corners and heights $c, d$ at the back, then:

$h(x, y) = a + \frac{y}{w}(b-a) + \frac{x}{l}[c + \frac{y}{w}(d - c) - (a + \frac{y}{w}(b-a))]$

Where $x$ is the distance along the length and $y$ across the width and $h(x,y)$ is the height at that point.

$\int_{0}^{l} \int_{0}^{w}h(x, y)dydx = wl(\frac{a+b+c+d}{4})$

So, the volume is $wl$ times the average height of the four corners, which makes sense.

Last edited: Apr 8, 2015
20. Apr 8, 2015

da_nang

This is of course assuming the surface is a hyperbolic paraboloid, which is not necessarily the case. But it works as an approximation.

An alternative approximation is to use two diagonally opposite points at heights $z_1, z_2$. This allows you to calculate the volume as $V = \frac{z_1 + z_2}{2} \Delta x \Delta y$ by interpreting the surface as a plane.

Last edited: Apr 8, 2015