I was hoping someone could help provide a formula that can solve the (X,Y,Z) dimensions/coordinate for the Apex of the given pyramid?
How can this be done using triangulation?
I have modelled it in CAD so can proved the X, Y, Z if necessary, but I have been unable to figure out how to calculate them using the given data in the image.
Drawing of the pyramid and given dimensions
Base cordents of pyramid:
X, Y, Z
0, 4.6188, 0
-4, -2.3094, 0
4, -2.3094, 0
Many thanks!
Let $\vec{v}_1 = (x_1, y_1, z_1)$, $\vec{v}_2 = (x_2, y_2, z_2)$, and $\vec{v}_3 = (x_3, y_3, z_3)$ be the three vertices at the base of the tetrahedron, and $\vec{v} = (x, y, z)$ be the apex vertex. Also let $d_1$, $d_2$, and $d_3$ be the edge lengths between the vertices and the apex: $$\left\lbrace \begin{aligned} d_1 & = \sqrt{ (x - x_1)^2 + (y - y_1)^2 + (z - z_1)^2} \\ d_2 & = \sqrt{ (x - x_2)^2 + (y - y_2)^2 + (z - z_2)^2} \\ d_3 & = \sqrt{ (x - x_3)^2 + (y - y_3)^2 + (z - z_3)^2} \\ \end{aligned} \right . \tag{1a}\label{G1a}$$ Because both are always nonnegative, we can square both sides, getting the easier form $$\left\lbrace \begin{aligned} d_1^2 & = (x - x_1)^2 + (y - y_1)^2 + (z - z_1)^2 \\ d_2^2 & = (x - x_2)^2 + (y - y_2)^2 + (z - z_2)^2 \\ d_3^2 & = (x - x_3)^2 + (y - y_3)^2 + (z - z_3)^2 \\ \end{aligned} \right . \tag{1b}\label{G1b}$$ This is a system of three equations and three unknowns, and has zero, one, or two solutions. The zero solution case means there is an error in the data, as the values do not yield a valid tetrahedron. The one solution case is uninteresting, because the tetrahedron is degenerate: a flat triangle. The two solution case is interesting, and the only difference between the two is which side of the plane formed by the three known vertices the apex is on; the distance and location is the same, only the side is unknown.
Note that we need to know the coordinates of each vertex, and its distance to the apex, to solve the location of the apex. The image shown does not indicate which vertex is which, so we cannot identify which edge length $d_j$ is between which vertex and the apex.
Because the base vertices are all on the $z = 0$ plane, we can only tell – for example by brute-force testing all possible vertex and edge length conditions, or by observing the geometric properties – that the vertex $z$ coordinate (and for the same reason, the height of the tetrahedron) must be $\pm 4.0000$.
Using the free Maxima computer algebra system, we can trivially solve such systems of equations.
For example, with $\vec{v}_1 = (0, 0, 0)$, $d_1 = 4$, $\vec{v}_2 = (2, 2, 0)$, $d_2 = 3$, $\vec{v}_3 = (2, -1, 0)$, $d_3 = 4$:
we obtain the two solutions, $x = 23/8$, $y = 7/8$, $z = \pm \sqrt{223/32}$. Because the base of the tetrahedron is on the $z=0$ plane, the two possible apexes are at $z = \pm \sqrt{223/32}$. In other words, the apex is at $\vec{v} = (2.8750, 0.8750, \pm 2.6398)$.