🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.misc
Article #106

Re: Re: ¿IRREGULAR AREA?

#106
From: cbfalconer
Date: Thu, 22 Oct 1998 00:00
35 lines
2373 bytes
In article <70n516$31l$1@news01.btx.dtag.de>,
  einhardschule@t-online.de (Rudolf Polzer) wrote:
> Rich Pasco <pasco@best.com> schrieb im Beitrag <362C91A2.7F40@best.com>...
> > If you define the area as a polygon, then the point is "in" the area
> > if it is on the correct side of each of the sides of the polygon, e.g.
>
> Then the polygon has to be convex.
>
> Example: a concav (or concave?) polygon
>
> +++++    +++++
> +   +    +   +
> +   +    + p +
> +   xxxxxx   +
> +            +
> ++++++++++++++
>
> Now we check if the point p is on the correct side of xxxxxx.
> It isn't, is it?
>
> The point is that your rule doesn't work in a concav polygon, but only in
> convex ones.

I think if you look up Sedgewick's "algorithms" (which is in Pascal) or
"algorithms in c" (a later version, using ---) you will find a positive
algorithm which counts the intersections of the perimeter with a sufficiently
extended line through the point.  That is not quite right, but go look it up.
 I don't have the book handy right now.  The only gotcha is perimeter
intersections that are double valued, i.e. line passing thru a cusp.

--
    Chuck Falconer (Charles_Falconer@NOSPAMapsnet.com)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Technical Details
Message-ID: <70o84l$pds$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <70g4og$cp2$1@news.hamburg.pop.de> <362C91A2.7F40@best.com> <70n516$31l$1@news01.btx.dtag.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c950,b2af222be2a1216e
X-Google-Attributes: gid10c950,public
X-Google-Thread: 10261c,b2af222be2a1216e
X-Google-Attributes: gid10261c,public
X-Google-Thread: 111659,b2af222be2a1216e
X-Google-Attributes: gid111659,public
X-Google-Thread: 108ebd,b2af222be2a1216e
X-Google-Attributes: gid108ebd,public
From: cbfalconer@my-dejanews.com
Subject: Re: Re: ¿IRREGULAR AREA?
Date: 1998/10/22
Message-ID: <70o84l$pds$1@nnrp1.dejanews.com>
X-Deja-AN: 404044966
References: <70g4og$cp2$1@news.hamburg.pop.de> <362C91A2.7F40@best.com> <70n516$31l$1@news01.btx.dtag.de>
X-Http-Proxy: 1.0 x6.dejanews.com:80 (Squid/1.1.22) for client 208.31.20.66
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Thu Oct 22 21:29:59 1998 GMT
Newsgroups: comp.lang.pascal.misc,borland.public.turbopascal,comp.lang.pascal.ansi-iso,comp.lang.pascal.borland
X-Http-User-Agent: Mozilla/3.0Gold (Win95; I)