Testing whether a line segment intersects a sphere

后端 未结 4 390
感动是毒
感动是毒 2020-12-17 03:42

I am trying to determine whether a line segment (i.e. between two points) intersects a sphere. I am not interested in the position of the intersection, just whether or not t

4条回答
  •  清酒与你
    2020-12-17 04:10

    This page has an exact solution for this problem. Essentially, you are substituting the equation for the line into the equation for the sphere, then computes the discriminant of the resulting quadratic. The values of the discriminant indicate intersection.

提交回复
热议问题