I have the following problem:
I have a sphere I need to check whether it is intersecting a finite plane or not. The information I have on the plane is its implicit equation and its extent defined in $x,y,z$. Is there any quick way to determine if there is an intersection between them or I have to rely on the more expensive generic sphere/polygon intersection?
Thanks, Jack
Standard vector algebra can find the distance from the center of the sphere to the plane. If that's less than the radius, they intersect.
Whether it meets a particular rectangle in that plane is a little more work. You can find the circle in which the sphere meets the plane. Then it's a two dimensional problem. Here's a tedious but straightforward approach to that. I'll assume you've figured out the center and radius of the circle and have the vertices of the rectangle.
Imagine the edges of the rectangle produced to make this tic-tac-toe board picture
Then find out which region contains the center $O$ of the circle (that's just checking some inequalities using the equations of the edges of the rectangle).
If $O$ is in the
Xregion you're done. If it's in aCregion, check to see if the near corner is in the circle. If it's in anEregion, check that the distance to the edge is less than or equal to the radius.