How to determine $x, y, z$ coordinates of the third vertex of a 3D triangle? Given a line $AB$ such that $A(0,0,0)$ and $B(4,7,9)$. How can I obtain a point $C(x,y,z)$ of $\Delta ABC$ with $AB$, $AC$, and $BC$ known?
Any help will be appreciated!
 A: We are given two fixed points  $A$ and $B$ in three space and two positive numbers $a$ and $b$ which together with $c=|AB|$ satisfy the triangle inequalities. We are looking for a point $C$ such that $|AB| = c, \,\, |BC|=a$ and $|CA| = b$. 
Assume we have found one such point $C$. Let $H \in AB$ be the (unique) point on $AB$ such that $CH$ is perpendicular to $AB$. Since we are in three space, it turns out that all points $C$ that satisfy the conditions $|BC|=a$ and $|CA| = b$ form a circle lying on the plane through $H$ perpendicular to line $AB$. Moreover, the center of the circle is $H$ and its radius is $|CH|$. WE want to find a parametrization of that circle.
As already mentioned, point $H \in AB$ is such that $CH$ is perpendicular to $AB$, i.e. $CH$ is the altitude of triangle $ABC$ through the vertex $C$. Then $H$ splits the segment $AB$ into two segments $AH$ and $BH$. Let $|AH| = c_b$ and $|BH| = c_a$. By construction $c_a+c_b = c.$ Furthermore, by Pythagoras' theorem $$b^2 - c_b^2 = |CH|^2 = a^2-c_a^2.$$ Thus, we have a system of 2 equations for the unknown variables $c_a,c_b$:
\begin{align}
c_b^2-c_a^2 &= b^2-a^2\\
c_b+c_a &= c
\end{align} 
and when we solve it we obtain 
\begin{align}
c_b &= \frac{b^2-a^2+c^2}{2c}\\
c_a &= \frac{a^2-b^2+c^2}{2c}
\end{align}
Furthermore, we can find the length of the altitude
$$|CH| = \sqrt{b^2-c_b^2} = \frac{\sqrt{(a+b+c)(a+b-c)(a-b+c)(-a+b+c)}}{2c}$$
Next, observe that the coordinate system is with origin $A$. Let $\overrightarrow{e}_1 = (1,0,0)$. Then clearly $\overrightarrow{e}_1$ and $\overrightarrow{AB}$ are linearly independent. Therefore vector $\overrightarrow{e}_1 \times \overrightarrow{AB}$ is perpendicular to vector $\overrightarrow{AB}$ and vector $\overrightarrow{AB} \times(\overrightarrow{AB} \times \overrightarrow{e}_1)$ is perpendicular to both vectors $\overrightarrow{AB}$  and $\overrightarrow{e}_1 \times \overrightarrow{AB}$. Furthermore, the vectors $$\frac{\overrightarrow{e}_1 \times \overrightarrow{AB}}{|\overrightarrow{e}_1 \times \overrightarrow{AB}|} \,\,\, \text{ and }\,\,\, \frac{\overrightarrow{AB} \times(\overrightarrow{AB} \times \overrightarrow{e}_1)}{|\overrightarrow{AB} \times(\overrightarrow{AB} \times \overrightarrow{e}_1)|}$$ are of unit length and are perpendicular to each other, as well as each of them is perpendicular to $\overrightarrow{AB}$. Therefore, the circle we are looking for can be parametrized as
$$\overrightarrow{AC} = \overrightarrow{AH} + |CH| \left(\cos{\theta} \, \frac{\overrightarrow{AB} \times(\overrightarrow{AB} \times \overrightarrow{e}_1)}{|\overrightarrow{AB} \times(\overrightarrow{AB} \times \overrightarrow{e}_1)|} + \sin{\theta} \, \frac{\overrightarrow{e}_1 \times \overrightarrow{AB}}{|\overrightarrow{e}_1 \times \overrightarrow{AB}|}\right).$$ But $$\overrightarrow{AH} = c_b\frac{\overrightarrow{AB}}{|AB|} = \frac{c_b}{c}\overrightarrow{AB}.$$ Thus
$$\overrightarrow{AC} = \frac{c_b}{c}\overrightarrow{AB} + \sqrt{c^2-c_b^2} \left(\cos{\theta} \, \frac{\overrightarrow{AB} \times(\overrightarrow{AB} \times \overrightarrow{e}_1)}{|\overrightarrow{AB} \times(\overrightarrow{AB} \times \overrightarrow{e}_1)|} + \sin{\theta} \, \frac{\overrightarrow{e}_1 \times \overrightarrow{AB}}{|\overrightarrow{e}_1 \times \overrightarrow{AB}|}\right).$$ We know everything in this equation -- we have vectors $\overrightarrow{AB}$ and $\overrightarrow{e_1}$, as well as 
\begin{align}
c_b &= \frac{b^2-a^2+c^2}{2c}\\
\sqrt{b^2-c_b^2} &= \frac{\sqrt{(a+b+c)(a+b-c)(a-b+c)(-a+b+c)}}{2c}.
\end{align}
My brief computations show that in numbers
$$
\begin{pmatrix}
C_1\\ C_2 \\ C_3
\end{pmatrix} =  \frac{c_b}{c}\begin{pmatrix}
4\\  7\\ 9 
\end{pmatrix}  + \sqrt{c^2-c_b^2} \left(\frac{\cos{\theta}}{\sqrt{4749}}  \, \begin{pmatrix}
-65\\  14\\ 18 
\end{pmatrix}  + \frac{\sin{\theta}}{\sqrt{130}}  \,  \begin{pmatrix}
0\\  -9\\ 7 
\end{pmatrix}\right) 
$$
A: The known values of $|AC|$ and $|BC|$ essentially give you equations for the coordinates of $C$. For instance if we have $|AC|=d_1$ and $C$ is the point $(x,y,z)$ then,
$$|AC|=d_1 \Rightarrow x^2+y^2+z^2=d_1^2,$$
similarly, 
$$|BC|=d_2 \Rightarrow (4-x)^2+(7-y)^2+(9-z)^2 = d_2^2.$$
These equations however are not enough to uniquely specify the ordered pair for $C$. They equations determine the shape of the triangle, but not its orientation. As such there will be a free variable which the other two will depend on. 
I solved for $x,y,z$ in Maple for the specific case when $z=0$.
$$\color{blue}{x = {\frac {2}{65}}\,{d_{{1}}}^{2}+{\frac {292}{65}}-{\frac {2}{65}}\,{d_{
{2}}}^{2}}$$ $$\color{blue}{-{\frac {7}{130}}\,\sqrt {-{d_{{1}}}^{4}-32\,{d_{{1}}}^{2}-
21316+2\,{d_{{1}}}^{2}{d_{{2}}}^{2}+292\,{d_{{2}}}^{2}-{d_{{2}}}^{4}}}
$$
$$\color{red}{y={\frac {7}{130}}\,{d_{{1}}}^{2}+{\frac {511}{65}}-{\frac {7}{130}}\,{d
_{{2}}}^{2}}$$ $$\color{red}{+{\frac {2}{65}}\,\sqrt {-{d_{{1}}}^{4}-32\,{d_{{1}}}^{2}-
21316+2\,{d_{{1}}}^{2}{d_{{2}}}^{2}+292\,{d_{{2}}}^{2}-{d_{{2}}}^{4}}
} $$
$$z=0$$

If either of $d_1$ or $d_2$ are too short, then it shouldn't be possible to construct a triangle. This reveals itself through the expression inside the square roots; which is called the discriminant. If the discriminant is negative then it is not possible to form a triangle with the specified distances.
I plotted the discriminant in the specific cases when $d_1=4$ (first graph) and when $d_1=2$ (second graph). By observing the graphs you can see that only a certain range of $d_2$ values will result in a positive discriminant; too long or too short and there will not be a solution. Also note that the shorter I make $d_1$ the fewer possibilities there are.  


*

*$d_1=4$
 

*$d_1=2$

A: It'll be easier to do it in two dimensions, so let's start with that - A(0,0) and B(0,$\sqrt 146$).  (|AB| = $\sqrt{146}$ follows from the coordinates you gave and the Pythagorean theorem.)  The law of cosines then will give you that the y coordinate of C is $$\frac{|AC|^2 - |BC|^2 + 146}{2\sqrt{146}}$$ and the Pythagorean theorem will give you the x coordinate as $$\sqrt{|AC|^2 - \frac{(|AC|^2 - |BC|^2 + 146)^2}{584}}$$  (If this is imaginary, no suitable point exists.)
From there it's relatively easy.  You'll want to put your x- and y-axes back into 3-dimensional space.  Of course, your y-axis will run from the origin to (4,7,9), so multiply each term by the y-coordinate and divide by $\sqrt{146}$.  To find an orthogonal vector, you use something called the dot product, which is equal to the product of the magnitudes divided by the cosine.  In Cartesian coordinates, you work out the dot product by multiplying each coordinate and then adding the products.  To get a right angle, you want it to be zero, so (21,6,-14) is appropriate.  Again multiply each term, this time by the x-coordinate, and divide by $\sqrt{673}$.  Add the two and you'll get an appropriate point.
A: Find the angle C and altitude CH ( H is on AB) by Sine Rule in the plane of ABC. All angles are known.
The locus of C is a circle whose plane is perpendicular to AB. Sides $ AC \rightarrow Ac $ and $ BC \rightarrow Bc $ are rotated generators of a double cone with cone base radius CH by means of a rotation  parameter $t$.
By using cross and dot vector products the variable unknown parameters can be found out in terms of $t$.
