Minimum Distance between a Point and a Quadrilateral
Posted: Fri Jun 08, 2007 3:52 pm
Hey folks!
Does anyone know of a "relatively" simple method of determining the minimum distance between a point and a quadrilateral? I currently have the co-ordinates of the point, and the co-ordinates of the four quadrilateral vertices. I'm hoping to use it to determine whether a sphere intersects the quadrilateral or not, by determining the minimum distance between the sphere's centre and the quadrilateral, and checking whether it is smaller than the sphere's radius.
I have found a method that checks the minimum distance between the point and the vertex co-ordinates, and then the distance between the point and the quadrilateral line segments.. then taking the minimum. However, the above check would then return "false" if the sphere passed straight through the centre of the quadrilateral, and the sphere's radius small enough to pass through without vertex or line segment contact.
In short, I'm looking to determine the minimum distance between a point and a quadrilateral, taking into account the surface of the quadrilateral (as oppose to just it's edges).
Any help is very much appreciated! Thanyou
Does anyone know of a "relatively" simple method of determining the minimum distance between a point and a quadrilateral? I currently have the co-ordinates of the point, and the co-ordinates of the four quadrilateral vertices. I'm hoping to use it to determine whether a sphere intersects the quadrilateral or not, by determining the minimum distance between the sphere's centre and the quadrilateral, and checking whether it is smaller than the sphere's radius.
I have found a method that checks the minimum distance between the point and the vertex co-ordinates, and then the distance between the point and the quadrilateral line segments.. then taking the minimum. However, the above check would then return "false" if the sphere passed straight through the centre of the quadrilateral, and the sphere's radius small enough to pass through without vertex or line segment contact.
In short, I'm looking to determine the minimum distance between a point and a quadrilateral, taking into account the surface of the quadrilateral (as oppose to just it's edges).
Any help is very much appreciated! Thanyou