Consider a quadrilateral inscribed in a semicircle of diameter $d$, as in the picture below, then $$d^2 = a^2 + b^2 + c^2 + \frac{2 a b c}{d}$$
Notes:
If one of the $a$, $b$, $c$ equals $0$, we get Pythagoras'
An older problem on this site asks (essentially) to determine $d$ if $(a,b,c) = (2,7,11)$.
The set $\{ (a,b,c,d) \ | d^3 = (a^2 + b^2 + c^2)d + 2 a b c\}$ can be parametrized by \begin{eqnarray} a &=& p(-p^2 + q^2 + r^2)\\ b&=&q(p^2 - q^2 + r^2)\\ c&=& r(p^2 + q^2 - r^2)\\ d&=& 2 p q r \end{eqnarray}
Provided as reference.
Any feedback would be appreciated!
$\bf{Added:}$
will write an answer tomorrow, perhaps some users would like to solve it on their own.
In the answer of @Cristhian Camacho to the older problem linked, we find this formula.
$\bf{Added:}$
A possible solution : the relation is equivalent to
$$1 = x^2 + y^2 + z^2 + 2 x y z$$ where $x = \frac{a}{d}, \ldots$, but then also $x = \sin \frac{\alpha}{2}, \ldots$, with $\alpha+ \beta + \gamma = \pi$. Now we have to show that if $u + v+w = \frac{\pi}{2}$, then
$$ 1- (\sin^2 u + \sin^2 v + \sin^2 w) - 2 \sin u \sin v \sin w$$ In fact we have a factoring.
Equivalently, one can show that if $\phi+ \psi + \theta = \pi$ ( angles of a triangle) then
$$1 = \cos^2 \phi + \cos^2 \psi + \cos^2 \theta + 2 \cos \phi \cos \psi \cos \theta$$
( $\phi = \frac{\pi}{2} - \frac{\alpha}{2}, \ldots$). This also provides the parametrization of the set, using formulas for the $\cos$ in a triangle.
$\bf{Added:}$ Just an idea how to handle more general things: say we want to determine a relation between the cosines of some angles with a sum a given rational multiple of $\pi$. Write $x_i = \cos \phi_i$, with $\sum \phi_i = \frac{ k \pi}{l}$. Then $\cos \phi_i = \frac{1}{2}( t_i + \frac{1}{t_i})$ and $(t_1 \cdots t_n)^l = (-1)^k$. Eliminating $t_i$ from the above gets a relation between the $x_i$. It could be rather involved, but our case is simple( $\phi_1 + \phi_2 + \phi_3 = \pi$, so $t_1 t_2 t_3 + 1 = 0$, and we get $1 = x_1^2 + x_2^2 + x_3^2 + 2 x_1 x_2 x_3$).