Finding the coordinates of the fourth vertex of tetrahedron, given coordinates of "base" vertices and the distances to them I have a tetrahedron defined as:

*

*"base" vertices $P$, $Q$, $R$ are given.

*length of "remain" edges $L_P$, $L_Q$, and $L_R$ are also given.

I need to find the 4th vertex coordinates $(x, y, z)$. The image below describes my problem:

I understand that there are two symmetric solutions, one where the vertex is up and another when the vertex is below the plane defined by $(P, Q, R)$.
I tried to solve this problem by considering 3 spheres $S_P$, $S_Q$, $S_R$ with center on $P$, $Q$, $R$ and radius $L_P$, $L_Q$, and $L_R$, respectively. I'm wondering if there is an easier straighforward way to solve this.
 A: After some work on my own question, I think I have found an alternative way to solve this problem.
The objective is to find the vertex $E$ of a tetrahedron defined as:

*

*Points $P$, $Q$ and $R$

*Distances $||\vec{PE}||$, $||\vec{QE}||$ and $||\vec{RE}||$
In this solution, $E$ can be achieved by finding the angles $\sigma$ and $\theta$ in order to construct a vector $\vec{PE}$.

Note that $\theta$ is the angle between the unknow vector $\vec{PE}$ and the plane defined by the points $P$, $Q$ and $R$. $\sigma$ is the angle between the projection of $\vec{PE}$ on the same plane $PQR$ and the vector $\vec{PR}$.
As the image suggests, $\sigma$ and $\theta$ can be obtained in a straightforward way from the tetrahedron height and elementary trigonometric properties, as shown below.
Finding $\vec{PE}$ angles $\sigma$ and $\theta$

*

*Find the tetrahedron $Volume$ using Calyer-Menger determinant:

$$288 Volume^2 = \left|\begin{matrix}0 & 1 & 1 & 1 & 1\cr 1 & 0 & ||\vec{RE}||^{2} & ||\vec{PE}||^{2} & ||\vec{QE}||^{2}\cr 1 & ||\vec{RE}||^{2} & 0 & \tilde||\vec{QE}||^{2} & \tilde||\vec{PE}||^{2}\cr 1 & ||\vec{PE}||^{2} & \tilde||\vec{QE}||^{2} & 0 & \tilde||\vec{RE}||^{2}\cr 1 & ||\vec{QE}||^{2} & \tilde||\vec{PE}||^{2} & \tilde||\vec{RE}||^{2} & 0\end{matrix}\right|$$


*Find the $Area$ of triangle $P$, $Q$, $R$ using Heron's formula:

$$Area = \frac{1}{4}\sqrt{4||\vec{PE}||^2||\vec{QE}||^2-(||\vec{PE}||^2+||\vec{QE}||^2-||\vec{RE}||^2)^2}$$


*Find the tetrahedron height $H$ using the relationship between $Volume$ and $Area$:

$$H = \frac{3\times Volume}{Area}$$


*Find $\theta$:

$$\theta = arcsin\left (\frac{H}{||\vec{PE}||}\right )$$
Once we have $\theta$ the next step is to find the length of the projections $\vec{PE'}$ and $\vec{RE'}$ onto the plane defined by $P$, $Q$ and $R$:

$$||\vec{PE'}|| = \sqrt{||\vec{PE}||^2 - H^2}$$
$$||\vec{RE'}|| = \sqrt{||\vec{RE}||^2 - H^2}$$


*Thus, using the cosine law, $\sigma$ is given by:

$$\sigma = arccos\left (\frac{||\vec{PE'}||^2 - ||\vec{RE'}||^2 + ||\vec{PR}||^2}{2 ||\vec{PE'}|| \times ||\vec{PR}||}\right )$$
Once we have $P$, $||\vec{PE}||$, $\sigma$ and $\theta$ we know everything we need to find $E$.
Finding $E$ given $\sigma$, $\theta$, $P$ and $||\vec{PE}||$
There are several ways to obtain $E(x, y, z)$, one of them is rotating $\vec{PR}$ by $\sigma$ and then rotating again by $\theta$, as demonstrated below.

*

*Find the triangle $PQR$ normal $\vec{n}$:

$$\vec{n} = \frac{\vec{PR}\times\vec{PQ}}{||\vec{PR}|| \times ||\vec{PQ}||}$$


*Rotate $\vec{PR}$ about $\vec{n}$ by $-\sigma$ using Rodrigues' formula:

$$\vec{PE'} = \vec{PR}cos(-\sigma) + (\vec{n} \times \vec{PR})\sin(-\sigma) + \vec{n}(\vec{n} \cdot \vec{PR}) (1 - cos(-\sigma))$$


*Find the normal $\vec{m}$ from $\vec{PE'}$ and $\vec{n}$:

$$\vec{m} = \frac{\vec{PE'}\times\vec{n}}{||\vec{PE'}|| \times ||\vec{n}||}$$


*Rotate $\vec{PE'}$ by $-\theta$ about $\vec{m}$:

$$\vec{PE_{dir}} = \vec{PE'}cos(-\theta) + (\vec{m} \times \vec{PE'})\sin(-\theta) + \vec{m}(\vec{m} \cdot \vec{PE'}) (1 - cos(-\theta))$$


*Get the unit vector from $\vec{PE_{dir}}$ and multiply it by $||\vec{PE}||$ in order to obtain $\vec{PE}$:

$$\vec{PE} = \frac{\vec{PE_{dir}}}{||\vec{PE_{dir}}||} \times ||\vec{PE}||$$
Finally, $E$ is given by
$$E = \vec{PE} + P$$
It is noteworthy that the symmetric solution $E_2$ can be find by rotating $\vec{PE'}$ about $\vec{m}$ by $+\theta$ (instead of $-\theta$):

One of my future work is checking out if this approach is less computational intensive than others.
Follow some images from an experiment where $E$ is obtained by the procedure described here. This program can be visualized here: https://doleron.github.io/tetrahedron-4th-vertex/ and the source code is here: https://github.com/doleron/tetrahedron-4th-vertex



Note that the spheres are there only for comparision purposes.
