Triangle with two constraints, each corner on a given line Given:
- 3 3-dimensional straight lines: a, b, c. All lines are coninciding in a single point S.
- Point B on b.
I'm now looking for a point A on a and a point C on c, where AB and BC have the same length and the angle ABC is 90 degrees.
I think this should be solvable with the law of sines. I know the angle BSC and distance SB and should be able to set up 2 equations with 2 unknowns: Length BC and the angle SBC - if I can express the angle SBA with SBC and the 90 degrees of ABC. I'm not sure how to express this angle in this (3D) case, though.
Thanks a lot for any help,
Patrick


 A: This is a complete rewrite, since my first solution involved an algebraic curve of degree three, and likely roots of a sixth degree polynomial. This here should be far easier.
You can describe the problem using three vectors $a,b,c\in\mathbb R^3$ such that each vector gives the direction of one of the lines, and furthermore $b=B-S$, i.e. it points exactly at point $B$. For the other two, the length of the vector does not matter. Then you can assume $A=S+\lambda\,a$ and $C=S+\mu\,c$ for some $\lambda,\mu\in\mathbb R$.
Now you have two conditions:
$$\langle A-B,C-B\rangle=0 \qquad \lVert A-B\rVert=\lVert C-B\rVert$$
where $\langle\cdot,\cdot\rangle$ denotes the dot product. You can write the first of these conditions, the right angle, as
\begin{align*}
\langle A-B,C-B\rangle&=0 \\
\langle A,C\rangle - \langle A,B\rangle - \langle C,B\rangle + \langle B,B\rangle&=0 \\
\lambda\mu\,\langle a,c\rangle - \lambda\,\langle a,b\rangle - \mu\,\langle c,b\rangle + \langle b,b\rangle&=0 \\[2ex]
(\lambda, \mu, 1)\cdot
\begin{pmatrix}
0 & \langle a,c\rangle & -\langle a,b\rangle \\
\langle a,c\rangle & 0 & -\langle c,b\rangle \\
-\langle a,b\rangle & -\langle c,b\rangle & 2\,\langle b,b\rangle
\end{pmatrix}
\cdot\begin{pmatrix}\lambda\\\mu\\1\end{pmatrix}
&=0
\end{align*}
The second condition, the equal length, can also be written as
\begin{align*}
\lVert A-B\rVert^2 - \lVert C-B\rVert^2 &= 0 \\
\langle A-B,A-B\rangle - \langle C-B,C-B\rangle &= 0 \\
\langle A,A\rangle - 2\,\langle A,B\rangle -
\langle C,C\rangle + 2\,\langle C,B\rangle &= 0 \\
\lambda^2\,\langle a,a\rangle - 2\lambda\,\langle a,b\rangle -
\mu^2\,\langle c,c\rangle + 2\mu\,\langle c,b\rangle &= 0 \\[2ex]
(\lambda, \mu, 1)\cdot
\begin{pmatrix}
\langle a,a\rangle & 0 & -\langle a,b\rangle \\
0 & -\langle c,c\rangle & \langle c,b\rangle \\
-\langle a,b\rangle & \langle c,b\rangle & 0
\end{pmatrix}
\cdot\begin{pmatrix}\lambda\\\mu\\1\end{pmatrix}
&=0
\end{align*}
Now you can interpret each of the quadratic equations as a description of a conic section in the projective plane. You can then apply the machinery for intersecting conics, which will involve solving a cubic equation. In the end, you obtain up to four points of intersection, from which you can  deduce possible solutions for $A=S+\lambda\,a$ and $C=S+\mu\,c$.
