Am 12.10.2017 um 10:36 schrieb Hul Tytus:
Given a triangle with the distance of all three sides known
I'll assume you meant _lengths_ of all three sides.
and an extra
point above that triangle with the distance to each of the triangle's points known, how is the height of the extra point above the plane of the triangle found?
In other words, you know the lenghts of all 6 sides of a tetrahedron in
3D space: AB, BC, AC, AD, BD and CD. Now you want to know one of its 4 heights.
This looks like there should be a simple solution, but I can't see
it.
"Simple" is relative. Without loss of generality you have 6 degrees of
freedom for the positions of the 4 vertices of this tetrahedron, in a coordinate system of your own choosing
A = ( 0, 0, 0)
B = (xB, 0, 0) | xB > 0
C = (xC, yC, 0) | yC > 0
D = (xD, yD, z) | z > 0
and 6 conditions to impose of them: the six lengths mentioned before:
AB = xB
AC^2 = xC^2+yC^2
BC^2 = (xB-xC)^2 + yC^2
AD^2 = xD^2 + yD^2 + z^2
BD^2 = (xD-xB)^2 + yD^2 + z^2
CD^2 = (xD-xC)^2 + (yD-yC)^2 + z^2
Now all you have to do is solve this set of equations :-)
xB = AB is obvious. Subtracting equations 2 and 3 eventually yields:
BC^2 - AC^2 = AB^2 -2*AB*xC
xC = (AB^2 - BC^2 + AC^2) / (2 * AB)
and putting that back into the second equation, you get:
yC = sqrt(AC^2 -xC^2)
Subtract equations 4 and 5 to get:
BD^2 - AD^2 = (xD - AB)^2- xD^2
= -2*xD*AB + AB^2
xD = (AB^2 - BD^2 + AD^2) / (2*AB)
Subtract 5 and 6 to get
BD^2 - CD^2 = (xD-xB)^2 - (xD-xC)^2 + yD^2 - (yD-yC)^2
= (xD-xB)^2 - (xD-xC)^2 - 2*yD*yC + yC^2
yD = (CD^2 - BD^2 + (xD-xB)^2 + (xD-xC)^2 + yC^2) / (2*yC)
and finally
z = sqrt(AD^2 - xD^2 - yD^2)
It may pay off to pass the final results through a numerical solver to
fight likely rounding errors incurred along the way.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)