# Formula to calculate area of a prism with different bases

I'm a bit stuck on a geometric problem and after searching on Google, cannot find anything suitable - partly because I don't really know what to search for.

I've got a number of cross sections from along a river channel and want to work out a generalised volume for the channel. The cross sections are all separated by known distances, but the sizes and shapes vary.

I am not very au fait with maths, but I believe the Cavalieri principle can be applied when the shapes vary but the area remains the same?.. or have I got this wrong and can it be used or adapted to work for this problem?

I'd be greatful if anybody could help me with a formula or point me in the right direction of where to look?

The image below illustrates what I'm talking about.

Thanks Cobain

Notice that in the diagram, three of the four vertices on the "river bottom" at A are connected to the same vertex at the left side of the "bottom" of B. If you were to connect the vertices differently, for example connect three of the vertices of A to the "right bottom" vertex of B, you would form a solid with a larger volume.

Given that you do not really know how the actual cross-section of the river varies between the measured cross-sections, you have to take a guess. You could linearly interpolate the cross-sectional area, but if you apply that method to several cross-sections parallel to the base of a pyramid, you don't get back the volume of the pyramid. An alternative might be to use the formula for the volume of a frustum:

$$V = \frac13 h(A + B + \sqrt{AB})$$

where $A$ and $B$ are the areas of the two bases of the frustum (corresponding to the two cross-sections A and B in your figure) and $h$ is the distance between cross-sections.

• Hi @David - thanks for your reply. This certainly seems like a logical function based on the uncertainties involved in terms of changes in channel cross section. Thanks for the suggestion. Thanks to everybody else for your input too, it is greatly appreciated! – Cobain Mar 29 '15 at 1:39

Just expanding a bit Emilio Novati's answer, if we assume that the area of the section is a linear function, when we are at distance $d$ from the $A$-base the area of the section is given by: $$\frac{\mu(A)(10-d)+\mu(B)d}{10}$$ hence the volume of the prism is simply given by: $$10\cdot\frac{\mu(A)+\mu(B)}{2},$$ as expected by summing the areas of two "symmetric" sections.

If the sections are orthogonal to the direction of the axis $x$ and you know how the area $S(x)$ of the section varies with $x$, you can express the volume as:

$$\int_{x_1}^{x_2} S(x) dx$$

The function $S(x)$ depend on the exact geometry of your problem.

From the figure it seems that the inital area can be decomposed in two parts: a great trapezoid $A_1$ that does not change with $x$ and a little trapezoid whose inital area is $A_2=\dfrac{1}{2}h_0(a_0+b_0)$ ( with obvious meaning of the symbols). This area change with $x$ as $A_2(x)=\dfrac{1}{2}h_0(a_0+b_0)(l-x)^2$ where $l=10$ in OP. So the total area is expressed by the function: $S(x)=A_1 +\dfrac{1}{2}h_0(a_0+b_0)(l-x)^2$ that is not linear.

Note that, calculating the integral, this volume is $A_1l+\dfrac{1}{3}A_2l$, i.e. the volume of the prism with basis $A_1$ plus the volume of the pyramid with basis $A_2$.

But, if also the area $A_1$ change with $x$, as is the case if the slope of the borders change, then the result change.

• Thanks for your answer @Emilio - the sections are orthogonal to the x axis and the changing of face A to face B is to be assumed as a uniform linear change, so how would that be expressed numerically if, for example, face A was 10m^2 and face B 25m^2? Sorry for my ignorance, but my maths ability is essentially at everyday usage level. I'm also guessing that d is the length of the 'prism'? Thanks again! – Cobain Mar 28 '15 at 15:04
• If the the area of the sections is a linear function of $x$ than the answer of Jack D'Aurzio work very well and you have a simple formula for the volume. But from your figure I'm not sure that the area is a linear function. – Emilio Novati Mar 28 '15 at 16:30
• If you can write a formula for cross sections at ends of the solid, it can be integrated. – Narasimham Mar 28 '15 at 17:09

In general, if we rotate the solid so that the $z$ axis is orthogonal to the bases, the areas of the "slices" do not vary proportionally with $z$. If you can decompose the solid into two or more solids of wich you can calculate the volume with standard formulas, as pointed out by Emilio Novati, go with it. If it's not the case, instead, but you know the exact shape of the two bases and where the edges connect, you can use the shoelace formula to get the area of the sections and then integrate over the height of the solid.

Let $n$ be the number of edges that connect one base to the other. First of all, let us write each one of them as a 3D line in the form:

\begin{align} x_i(z)&=\alpha_i z + \beta_i \\ y_i(z)&=\gamma_i z + \delta_i \end{align}

If we substitute a particular value of $z$ in these equations, the points $\left(x_i(z), y_i(z)\right)$ are the vertexes of the cross section of the prismoid at that height. Hence, we can apply shoelace formula to get the area of the cross section at height $z$:

$$A(z) = \frac{1}{2} \left|\sum_{i=1}^n \text{det} \begin{pmatrix} x_i & x_{i+1}\\ y_i & y_{i+1} \end{pmatrix} \right| = \frac{1}{2} \left|\sum_{i=1}^n \text{det} \begin{pmatrix} \alpha_i z + \beta_i & \alpha_{i+1} z + \beta_{i+1}\\ \gamma_i z + \delta_i & \gamma_{i+1} z + \delta_{i+1} \end{pmatrix} \right| =$$ $$=\frac{1}{2} \left|\sum_{i=1}^n (\alpha_i \gamma_{i+1}-\alpha_{i+1}\gamma_i)z^2+ (\alpha_i\delta_{i+1}+\beta_i\gamma_{i+1}-\alpha_{i+1}\delta_i-\beta_{i+1}\gamma_i)z+(\beta_i\delta_{i+1}-\beta_{i+1}\delta_i)\right|=$$ $$=\frac{1}{2}\left|\sum_{i=1}^n (\alpha_i \gamma_{i+1}-\alpha_{i+1}\gamma_i)\right| z^2 + \frac{1}{2}\left|\sum_{i=1}^n(\alpha_i\delta_{i+1}+\beta_i\gamma_{i+1}-\alpha_{i+1}\delta_i-\beta_{i+1}\gamma_i)\right| z + \frac{1}{2}\left|\sum_{i=1}^n(\beta_i\delta_{i+1}-\beta_{i+1}\delta_i)\right|$$

Let $h$ be the total height of our solid. In order to get its volume, we just need to integrate $A(z)$ between $0$ and $h$:

$$V = \int_0^h A(z)\, \partial z =$$ $$= \frac{1}{6}\left|\sum_{i=1}^n (\alpha_i \gamma_{i+1}-\alpha_{i+1}\gamma_i)\right| h^3 + \frac{1}{4}\left|\sum_{i=1}^n(\alpha_i\delta_{i+1}+\beta_i\gamma_{i+1}-\alpha_{i+1}\delta_i-\beta_{i+1}\gamma_i)\right| h^2 + \frac{1}{2}\left|\sum_{i=1}^n(\beta_i\delta_{i+1}-\beta_{i+1}\delta_i)\right| h$$