I am trying to determine where a given straight line intersects a small cluster of points that define an arbitrary surface in 3-D space. My approach has been to create a surface defined as
$z = a + bx + cy + dxy + ex^2 + fy^2$
where $(x,y,z)$ are the known points defining the surface. Once I have all of the coefficients, I substitute the symmetric form of the straight line into my regression and get a quadratic equation for $z$.
My issue now is that I will obtain two solutions that satisfy both the straight line and surface equations, but I only want to keep the one that lies on the portion of the surface provided by my initial small cluster of points. My original thought was to compute the convex hull of the point cloud and then check the distances between both solutions and each triangle defining the convex hull, but this is more computationally expensive than I would like. Is there a faster or possibly different approach to eliminating the solution I don't want?