Article View: sci.math.num-analysis
Article #488Re: Polygon in or out?
From: samer Takriti
Date: Thu, 10 Sep 1992 12:20
Date: Thu, 10 Sep 1992 12:20
18 lines
1170 bytes
1170 bytes
In article <1992Aug25.195204.28914@eng.ufl.edu> Ed Deeters: > Hi, does anyone know a fast way to determine if a point(x,y) is inside > or outside of a polygon when the polygon is defined by n points(x,y) > given in a clockwise manner? If the polygon is convex, or if you are trying to check if the given point is inside the convex hull of the given points then you can use linear programming to do so. Assume that the coordinates of point i are given by the vector x(i) then the formulation would be: x = c(i) * x(i) sum_i c(i) = 1 c(i) >= 0 x is the coordinate vector of the point you are trying to see whether it is inside or outside the polygon. c(i) is the unknown. Use linear programming to see if the problem has a feasible solution or not. -Samer
Technical Details
Message-ID:
<0Lr-sX-@engin.umich.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!takritiReferences:
<1992Sep9.141511.23893@dutrun2.tudelft.nl>Show Full Headers
Complete Article Headers
Newsgroups: sci.math.num-analysis Path: arc1-ca.pugleaf.net!sparky!uunet!caen!takriti From: takriti@engin.umich.edu (samer Takriti) Subject: Re: Polygon in or out? Message-ID: <0Lr-sX-@engin.umich.edu> Date: Thu, 10 Sep 92 08:20:41 EDT Organization: University of Michigan Engineering, Ann Arbor References: <1992Sep9.141511.23893@dutrun2.tudelft.nl> Nntp-Posting-Host: ephedra.engin.umich.edu Lines: 18