Given four coordinates that define the corners of an irregular quadrilateral and a point defined by its coordinates, what is the simplest way to determine if the point is within or outside of the quadrilateral?
2026-03-29 11:07:55.1774782475
On
Determine if the coordinates of a point are within an irregular quadrilateral whose corners are defined by coordinates
3.9k Views Asked by Bob https://math.techqa.club/user/bob/detail At
2
There are 2 best solutions below
0
On
Although the links provided in some sense answer the question, the specific question can be answered without the full force of a point-in-polygon computation. I would recommend this. Compute whether each angle of your quad $(a,b,c,d)$ is convex or reflex. If one is reflex (say $a$), connect it to the opposite vertex $c$. If all are convex, choose any diagaonal; e.g., $(a,c)$. Now you have partitioned your quad into two triangles. Check if your point is in either triangle, by checking if it is left-of-or-on each of its three edges.
Take a look at this wikipedia entry, or an introductory book on computational geometry.