<s>[INST] Intersection points of a Triangle and a Circle How can I find all intersection points of the following circle and triangle?
Triangle
$$A:=\begin{pmatrix}22\\-1.5\\1 \end{pmatrix} B:=\begin{pmatrix}27\\-2.25\\4 \end{pmatrix} C:=\begin{pmatrix}25.2\\-2\\4.7 \end{pmatrix}$$
Circle
$$\frac{9}{16}=(x-25)^2 + (y+2)^2 + (z-3)^2$$
What I did so far was to determine the line equations of the triangle (a, b and c):
$a : \overrightarrow {OX} = \begin{pmatrix}27\\-2.25\\4 \end{pmatrix}+ \lambda_1*\begin{pmatrix}-1.8\\0.25\\0.7 \end{pmatrix} $
$b : \overrightarrow {OX} = \begin{pmatrix}22\\-1.5\\1 \end{pmatrix}+ \lambda_2*\begin{pmatrix}3.2\\-0.5\\3.7 \end{pmatrix} $
$c : \overrightarrow {OX} = \begin{pmatrix}22\\-1.5\\1 \end{pmatrix}+ \lambda_3*\begin{pmatrix}5\\-0.75\\3 \end{pmatrix} $
But I am not sure what I have to do next...
 [/INST] You want to find the intersection points of the lines and the cycle. You can to this by substituting. 
For instance: line $a$.
$$9 = (27-1.8\lambda_1 -25)^2 + (-2.25 + 0.25\lambda_1+2)^2 + (4+0.7\lambda_1)^2$$
Now you can calculate the value of $\lambda_1$, using the Quadratic formula. 
You can ran into 3 cases: the discriminant is negative, in this case you have no intersection points, the discriminant is 0, there is one intersection point (note: the line is a tangent to the cycle in the found point), of discriminant positive, therefore 2 intersection points. 
You get the coordinates of the points, by substituting $\lambda_1$ into the line equation $a$. 
Now you have to check, if the points are indeed part of the triangle, or just part of the extension of the line. You can do this by making the creating the vectors $AB$ and $AP$. Look if they look both in the same direction and look, if $AB$ is longer than $AP$.  
</s>