MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Point inside a plygon?

  • To: mathgroup at
  • Subject: [mg25382] Re: [mg25239] Point inside a plygon?
  • From: "Christopher J. Henrich" <chenrich at>
  • Date: Fri, 29 Sep 2000 01:06:14 -0400 (EDT)
  • References: <8qhmln$>
  • Sender: owner-wri-mathgroup at

David Park wrote:
> Adriano,
> Here is a different solution for the point inside a polygon question.
> PointInPolygon::usage =
>     "PointInPolygon[point, polygonvertices] will determine if a point is \
> within a polygon defined by its vertices. Its method is to calculate the \
> cross product of each leg of the polygon with the vector from the base of
> the \
> leg to the point. If there is a change in sign of the z component going \
> around the polygon, the point is outside the polygon.";
> > -----Original Message-----
> >
> > I need a routine to check if a point is inside or outside a polygon
> > (simple polygon non self-intersecting).
> > Any help appreciated.
> >
> > Adriano Moreira
> >
David Park's solution is correct if the polynomial in question is
convex.  If  it is not, then the problem is more difficult.

Chris Henrich

  • Prev by Date: Re: extracting elements from a list?
  • Next by Date: RE: sampling without replacement
  • Previous by thread: RE: Point inside a plygon?
  • Next by thread: Question