2

enter image description here

KNOWN:

  • Length DC
  • Alpha
  • Beta
  • Surface S

NEEDED:

  • Height h

For an algorithm, I require a way to solve this for any trapezoid. Sort of like this question (Given a known isosceles Trapezoid find height of another with same angles & one base but different area) but not with the isosceles restriction.

Just like in that question, I effectively have all information about a larger trapezoid with identical angles and DC as well, but I think the only gain I get from that are the angles.

Have mattered my brain a while now without success. Going off of the formula for surface: S = h * ((AB + DC)/2) I could end up for the formula: h = (2*S) / (AB + DC) But this hardly helps because I do not know AB. Formulas based on the angles also always required both DC and AB, or alternatively the lengths of the legs.

Another idea I had was to split trapezoid into two right triangles and one square because solving the problem appears to be easier for each in particular. But after implementing half of that, I realized that I have no way of knowing what the desired surface area of each figure would be...

Is there a known solution to this? Huuge thanks in advance!

1 Answers1

2

This seems like a problem best done using trig. Consider:

Draw a vertical line upward from $D$ to a point $E$ on $AB$. Do the same downward from $B$ to $F$ on $CD$.

We know $\overline{DE}$ and $\overline{BF}$ are equal to h. $\overline{BE}$ and $\overline{DF}$ are some unknown distance $d$.

As you noted, the area is the sum of the rectangle and two triangles, which is $$S = dh + S(\Delta BFC) + S(\Delta ADE)$$

And we can find our lengths for the new segments

$$\overline{CF} = \frac{h}{\tan \beta}$$ $$\overline{AE} = h \tan (\alpha - 90°) = h \tan \gamma$$

I'm just throwing gamma as a sub for alpha - 90° in there for ease of reading. And all this means $$ S = dh + \frac{1}{2}\frac{h^2}{\tan \beta} + \frac{1}{2}h^2 \tan \gamma $$

Well, that's one equation in two variables. We need at least one more. Thankfully we know the length $\overline{CD}$, and it has to be:

$$ \overline{CD} = d + \frac{h}{\tan \beta}$$

Two last substitutions give

$$ S = h\left(\overline{CD}-\frac{h}{\tan \beta}\right) + \frac{1}{2}\frac{h^2}{\tan \beta} + \frac{1}{2}h^2 \tan \gamma $$

$$ S = h\cdot\overline{CD } + h^2\left(\frac{1}{2}\tan \gamma - \frac{1}{2 \tan \beta}\right)$$

And I'm not going to go through the quadratic equation with that using variables, so plug in your actual numbers at this point.

Hope that helps! Going to quickly double-check my steps though.

Eric Snyder
  • 3,007
  • OK, several edits later it looks a lot better. – Eric Snyder Aug 19 '20 at 23:35
  • This worked flawlessly! Awesome, thank you so much. I briefly thought of combining the formulas for triangles and the rectangle but backed off of the complexity. – DragonGamer Aug 20 '20 at 03:37
  • Glad it helped! Often what seems complex may actually become less complex upon breakdown. Out of interest, may I ask what the input values were? – Eric Snyder Aug 22 '20 at 23:30
  • That is true. Am not really used to doing that unfortunately. Should work on that. Hard to provide a set of values as that was not a one time calculation. I am using this solution for enhancing Unity3D's physics engine with a feature to simulate larger bodies of water in random terrain for a game. The terrain is defined by many connected points. When a water body grows (because of a water source), it looks for the next points along the walls. Two points on each wall form the larger trapezoid with known volume. (Continuation in other comment) – DragonGamer Aug 23 '20 at 04:49
  • However the water surface obviously shouldn't just jump from point to point but instead interpolate based on how much water the body should currently contain. That is where this calculation comes into play because it allows to determine a new height for the trapezoid that satisfies the target volume and thus tells where the water surface needs to be. – DragonGamer Aug 23 '20 at 04:50
  • Ah, I understand :) – Eric Snyder Aug 24 '20 at 06:05