Is it possible to determine if a vector intersects a sphere by its projection on a plane?

343 Views Asked by At

As a thought experiment, I was wondering if it'd be possible to determine if a vector (base point and displacement - as in a ray exiting a base point in a certain direction) intersects a sphere using the following algorithm:

  1. Project the sphere onto plane that is perpendicular to the vector (thus creating a circle on the plane).
  2. Determine if the vector intersects the circle that was projected onto the plane.

All help would be most appreciated.

Thanks in advance :)

1

There are 1 best solutions below

0
On

You can certainly tell whether or not a line intersects a sphere by examining their projections onto a plane perpendicular to the line, but not for a ray or line segment. The projection of the line/ray/line segment onto this plane is a point and the projection of the sphere is a disk. If the point is outside of the disk, then there is definitely no intersection, but if the point is within the disk, the end of a ray/line segment might still fall outside of the sphere. For example, consider the ray that emanates from $(0,0,2)$ in the direction of the positive $z$-axis. It clearly doesn’t intersect the unit sphere, but its projection onto the $x$-$y$ plane coincides with the projected sphere’s center. So, for a ray or line segment, you’ll have to perform additional tests, such as described in NominalAnimal’s comment to your question, to determine if it intersects the sphere even if its projection is inside the disk.