Three-sided pyramid with given base triangle and tip angles

3dgeometrytrigonometry

I have a practical problem that boils down to this geometric problem: I have a three-sided irregular pyramid where everything about the base triangle is known: all $3$ side-lengths $(a, b, c) $ and the angles $(\angle ab,\angle cb, \angle ac)$. I also do know the $3$ angles at the tip of the pyramid $(α, β, γ)$. What I want to calculate is the length of the remaining edges $e, f,$ and $g$ (that are connecting the base triangle with the tip).

sketch of the pyramid

With the law of cosine, I get this as a starting point:
$$a^2 = e^2 + f^2 – (2ef\cos(\alpha))$$
$$b^2 = f^2 + g^2 – (2fg\cos(\beta))$$
$$c^2 = g^2 + e^2 – (2ge\cos(\gamma))$$

When I try to solve this system of equations (using substitution and $pq$-formula) I had to give up at a point where I had a really long equation to the power of $4$. Is there a practical way in solving this?

Thanks 🙂

UPDATE:
As mentioned in a comment by Paul Sinclare another approach to solve this problem would be the use of the law of sine:

$$\frac{e}{sin(θ)}=\frac{a}{sin(\alpha)}=\frac{f}{sin(\alpha+θ)}$$
$$\frac{g}{sin(Φ)}=\frac{c}{sin(\gamma)}=\frac{e}{sin(\gamma+Φ)}$$
$$\frac{g}{sin(Ω)}=\frac{b}{sin(\beta)}=\frac{f}{sin(\beta+Ω)}$$

θ = angle between a and f

Φ = angle between e and c

Ω = angle between b and f

Trying to solve these equations for one angle also results in a huge equation I'm not able to solve by hand anymore. Any advice on how I should proceed?

Best Answer

The practical way to solve the system of equations that you obtained is by using the Newton-Raphson multivariate method. Define the vector function $\mathbf{f}$ as follows:

$ \mathbf{f} = \begin{bmatrix} f_1 \\ f_2 \\ f_3 \end{bmatrix} = \begin{bmatrix} x_1^2 + x_2^2 - 2 x_1 x_2 \cos(\alpha) - a^2 \\ x_2 ^2 + x_3^2 - 2 x_2 x_3 \cos (\beta) - b^2 \\ x_3^2 + x_1^2 - 2 x_3 x_1 \cos(\gamma) - c^2 \end{bmatrix} $

where $ x_1 = e, x_2 = f , x_3 = g $

The Jacobian of $\mathbf{f}$ is given by

$ J = \begin{bmatrix} \dfrac{\partial f_1}{\partial x_1} && \dfrac{\partial f_1}{\partial x_2} && \dfrac{\partial f_1}{\partial x_3} \\ \dfrac{\partial f_2}{\partial x_1} && \dfrac{\partial f_2}{\partial x_2} && \dfrac{\partial f_2}{\partial x_3} \\ \dfrac{\partial f_3}{\partial x_1} && \dfrac{\partial f_3}{\partial x_2} && \dfrac{\partial f_3}{\partial x_3} \end{bmatrix} = \begin{bmatrix} 2 x_1 - 2 x_2 \cos(\alpha) && 2 x_2 - 2 x_1 \cos(\alpha) && 0 \\ 0 && 2 x_2 - 2 x_3 \cos(\beta) && 2 x_3 - 2 x_2\cos(\beta) \\ 2 x_1 - 2 x_3 \cos(\gamma) && 0 && 2 x_3 - 2 x_1 \cos(\gamma) \end{bmatrix}$

Start with an initial guess $\mathbf{x}_0 = [ x_{10}, x_{20} , x_{30} ]^T $ then update the solution using the following Newton-Raphson formula,

$ \mathbf{x}_{k+1} = \mathbf{x}_k - J^{-1} \ \mathbf{f}_k $

After a few iterations, the vector $\mathbf{x}_k$ will converge to the solution $\mathbf{x}^*$ where $\mathbf{f}^* \approx \mathbf{0} $. Note that the matrix $J$ is not constant and varies as $\mathbf{x}_k$ varies. Its inverse has to be computed at each iteration.

Related Question