A pyramid $ABCDE$ has a square base $ABCD$ with coordinates $A = (0, 0, 0), B = (a, 0, 0), C = (a, a, 0) , D = (0, a, 0) $ , where the side length $a$ is given. The apex is point $E$,and we are given the angles $\angle AEB, \angle BEC, \angle CED$. I want to determine the position of the apex $E$.
My approach:
Let $s_1 = EA, s_2 = EB, s_3 = EC, s_4 = ED $. And let $\theta_1 = \angle AEB, \theta_2 = \angle BEC, \theta_3 = \angle CED $ , then using the law of cosines, we get
$ a^2 = s_1^2 + s_2^2 - 2 s_1 s_2 \cos \theta_1 $
$ a^2 = s_2^2 + s3^2 - 2 s_2 s_3 \cos \theta_2 $
$ a^2 = s_3^2 + s_4^2 - 2 s_3 s_4 \cos \theta_3$
In addition, it is easy to show that $s_1, s_2, s_3, s_4$ must satisfy
$ s_1^2 + s_3^2 = s_2^2 + s_4^2 $
We now have four quadratic equations in the four unknowns $s_1, s_2, s_3, s_4$. These can be solved numerically using, for example, Newton-Raphson multivariate method. Once these four lengths are determined, and they're all positive, then the apex can be found quite easily as follows. Let the apex $E = (x, y, z)$, then
$ s_1^2 = x^2 + y^2 + z^2 $
$ s_2^2 = (x - a)^2 + y^2 + z^2 $
$s_3^2 = (x - a)^2 + (y - a)^2 + z^2 $
$s_4^2 = x^2 + (y - a)^2 + z^2 $
Then it follows by taking differences of the above equations, that
$ x = \dfrac{ a^2 + s_1^2 - s_2^2 }{2 a} $
$ y = \dfrac{ a^2 + s_1^2 - s_4^2 } {2 a} $
And finally,
$ z = \sqrt{ s_1^2 - x^2 - y^2 } $
Whenever $s_1^2 - x^2 - y^2 \gt 0 $
From my numerical trials on this problems I found that, depending on the angles $\theta_1, \theta_2, \theta_3$, there could be no solutions, a single solution, or multiple solutions.
Any comments on this, or alternative solutions, are highly appreciated.