1

I have an irregular triangular pyramid. In this drawing, I have use arbitrary side lengths for simplicity. How do I find the altitude from the base (A,B,C) to the peak D? enter image description here

The answer in a post made no sense to me about the height of an oblique pyramid here but one comment suggests (to me) that I set up the following equations:

$$X=(AD^2 - BD^2)/2AB + AB/2$$ $$Y=(AD^2 - CD^2)/2AC + AC/2$$ $$H=\sqrt{AD^2 - X^2 - Y^2}$$ Is this correct? I have no idea what I'm doing.

P.S. Somebody noticed the 6,8,10 in my figure. Please disregard the coincidence of a Pythagorean triplet in the diagram. Treat it as though the triplet were 6,8,11 or something else not a $right$ triangle.

poetasis
  • 6,338

3 Answers3

3

We know that the volume of a tetrahedron is one-third the area of the base times the height, so if we can find the are of $\triangle ABC$ and the volume of the tetrahedron, we are home free. We can find the area of a triangle, given the lengths of the sides, by Heron's formula. At the bottom of the same Wikipedia page, there is a Heron-type formula for the volume of a tetrahedron, due to David Robbins. It doesn't look pleasant, but it should do the job.

I found another discussion of a tetrahedral volume formula (due to the renaissance painter Pierro della Francesca!) in Kevin Brown's Math Pages. Some care is necessary in using the formula, because as explained in the article, the formula depends on the pairings of opposite sides of the tetrahedron, and there are actually two tetrahedra, with different volumes, for a given pairing of six lengths. This is a complicated formula also, but it doesn't have all those square roots!

EDIT

Alternatively, just solve it with coordinate geometry. Here's a python script

from sympy.core.symbol import symbols
from sympy.solvers.solveset import nonlinsolve

# A(0,0,0)
# B(u,v,0)
# C(0,7,0)
# D(x,y,z)
# AB = 5
# AC = 7
# BC = 6
# AD = 9
# BD = 8
# CD = 10

u,v,x,y,z = symbols('u,v,x,y,z', real=True)
equations = (u**2+v**2-25, 
             u**2+(7-v)**2-36,
             x**2+y**2+z**2-81,
             x**2+(y-7)**2+z**2-100,
             (x-u)**2+(v-y)**2+z**2-64) 
solns = nonlinsolve(equations, [u,v,x,y,z])
for soln in solns:
    print(soln)

This produces the output

(-12*sqrt(6)/7, 19/7, -31*sqrt(6)/21, 15/7, -sqrt(570)/3)
(-12*sqrt(6)/7, 19/7, -31*sqrt(6)/21, 15/7, sqrt(570)/3)
(12*sqrt(6)/7, 19/7, 31*sqrt(6)/21, 15/7, -sqrt(570)/3)
(12*sqrt(6)/7, 19/7, 31*sqrt(6)/21, 15/7, sqrt(570)/3)

so that the height is $\boxed{{\sqrt{570}\over3}}\approx7.95822425754$

You should check that the solutions actually satisfy the given conditions, because I haven't done that.

saulspatz
  • 53,131
  • I'm sorry I don't speak python and it looks like it would take me a while to learn. I'm looking for a way to automate the search of many such pyramids to see if any have an integer for altitude. I also want to use only rational numbers until the last step to know for sure if the value is an integer or not. Would it be possible to translate your python code into PERL, BASIC, or even vanilla C? Assume sides $a=5$, $b=6$, $c=7$, $d=8$, $e=9$, $f=10$. – poetasis Sep 25 '18 at 16:59
  • @poetasis No, I'm afraid not. It's using a computer algebra system called sympy, that's built to run with python. To translate it, you'd have to a different computer algebra system, like Maple or sage. – saulspatz Sep 25 '18 at 18:03
  • I guess what I' – poetasis Oct 05 '18 at 17:04
  • @@saulspatz I guess what I'm looking for is $your$ equations translated into math formats I am used to such as $x+y+z=0$ or whatever. I can solve simultaneous equations by several methods. Can you give me that? – poetasis Oct 05 '18 at 17:10
  • The ** operator is exponentiation, and the equations mean that the expression is equal $0$. There are $5$ equations, and the last one (x-u)**2+(v-y)**2+z**2-64 means $(x-u)^2+(v-y)^2+z^2-64 = 0$ – saulspatz Oct 05 '18 at 17:14
  • @ saulspatz I am familiar with the $**$ usage for exponentiation. I just wasn't sure that, for example, you last equation was $(x-u)^2+(v-y)^2+z^2=64$. Now I can solve them (I think) and keep them as rational numbers until the last minute. This is essential because I want to automate this for a search of many computer-generated pyramids to see if any have integer altitudes. If I succeed you'll get the check. Thanks. – poetasis Oct 06 '18 at 11:40
1

Here is a general solution that is easy enough to understand. As others have done, let A=(0,0,0) and C=(7,0,0). From your example, $a=5$; $b=6$; $c=7$; Use the law of cosines to get angle $\alpha$ at point A in the xy plane. $a^2+c^2-2ac\,\cos(\alpha)=b^2$. Doing that, point $B=A + a\cdot(cos(\alpha), sin(\alpha),0)=(2.71429,4.19913,0)$ Next we will find point $D$, and having done so, the z-coordinate of $D$ is your height answer. To find $D$, we simply write the equation for 3 spheres with radii being the lengths of the 3 tetrahedron legs going out of the plane. Let's start with the hardest one, being the sphere centered at point $B$. $$(x-2.71429)^2 + (y-4.19913)^2 + z^2= 8^2$$ Now we write spheres for the two easy ones centered at $A=(0,0,0)$ and $C=(7,0,0)$. $$x^2 + y^2 + z^2 = 9^2$$ $$(x-7)^2 +y^2 +z^2=10^2$$ Finally, for the last part (which could be tedious or easy depending on your use of CAS), solve the three spheres simultaneously for $x,y,z$ and you are done. $$D=(2.14286,3.61591,7.95822)$$

Narlin
  • 1,201
  • Just looking at the diagram, it seems that the height (D) should be much greater than 2.14... I will have to build a model and check it out tomorrow. (I work nights; it's bedtime.) – poetasis Sep 09 '18 at 18:23
  • @poetasis The "height" is the z-coordinate of D, which is 7.95822. – Narlin Sep 09 '18 at 19:13
  • @ Narlin I misunderstood your "D" coordinates before but now I have more questions. Can I do this entirely with rational numbers (as fractions until the last minute?) My purpose is to find if there are such pyramids with integers for altitude. To this end, which sides, (a,b,c) are you using to find the sine and cosine of $\alpha$? – poetasis Sep 23 '18 at 16:54
  • Yes. You can do this entirely with rationals. It will be needed to use SageMath or some other CAS to handle large fractions. I used Geogebra and didn't post the very large fractions. I am using sides $a (a=5)$ and $c (c=7)$ and the law of cosines to solve for $\alpha$. The key to this solution is that points A, B, C are all found in the xy plane. – Narlin Sep 23 '18 at 20:34
  • I appreciate all the work you and others have done to help me understand all of this but I found something here that could yield the answer directly... but I don't think so. It would appear that the normal vector from a cross product $is$ the altitude. In the form $||a \times b|| = ||a||$ $||b|| sin⁡(θ)$ it looks like the product $ab$ times the sine of $\frac {a}{c}$. But that works out to $\frac{aba}{c}=\frac{150}{7}=21.428571428571429$ which is way out of line. Should I abandon this? – poetasis Sep 30 '18 at 17:14
  • Yes. You should abandon. You are using segment lengths (a,b,c) where WikiP expects vectors (in this case, ordered triples). If you used vectors, which have not been defined but could be quite easily, then $\Vert a\times b\Vert$ would yield the area of a parallelogram which isn't what you want. – Narlin Oct 01 '18 at 12:43
0

The angle at $B$ (DBC) made by the $6, 8, 10$ triangle is $90$ degrees. The angle at $B$ (ABC) made by the $5, 6, 7$ triangle is determined from the law of cosines $7^2 = 5^2 + 6^2 -2(5)(6)\cos(B)$. So $B = 78.4630$ degrees.

Looking end on along the edge of length 6, we see a foreshortened AB as a length of:

AB' $= 5\sin(78.463) = 4.89898$.

With length $AA' = \sqrt{5^2 - 4.89898^2} = 1$, we see a foreshortened length AD as:

$AD' = \sqrt{9^2-1^2} = 8.94427$.

This gives us an apparent $8, 8.94427, 4.89898$ triangle from which to calculate the elevation h from the $4.89898$ side.

Apparent angle $ABD' = \cos^{-1}\frac{8}{16\sqrt{24}} = 84.1421$ degrees.

$h = 8\sin(84.1421) = 7.9582$

Phil H
  • 5,579
  • The 6,8,10 was accidental. I don't even want a right triangle in my drawings. The actual numbers I'm working with are in the hundreds or even hundreds of thousands. Please disregard the coincidence. Does that change your answer if I made the 10 into an 11 or something? – poetasis Sep 09 '18 at 16:56
  • @poetasis. It would involve another iteration of determining the apparent length DB' of side DB = 8. What you need therefore is a neat generalized solution rather than a cobbled together specific solution. Conceptually, it means looking end on along one base edge and calculating the 3 apparent lengths of the triangle in view and then calculating its elevation from its base. – Phil H Sep 09 '18 at 17:05
  • I don't need the numbers changed. I just need readers to ignore and not use the coincidence that there is a right triangle in the drawing. – poetasis Sep 09 '18 at 17:08