home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!munnari.oz.au!hp9000.csc.cuhk.hk!hkuxb.hku.hk!h8915726
- From: h8915726@hkuxb.hku.hk (Medusa)
- Subject: Point inside an enclosed region
- Message-ID: <BzyurB.F19@hkuxb.hku.hk>
- Reply-To: h8915726@hkuxa.hku.hk
- Organization: University of Hong Kong
- X-Newsreader: Tin 1.1 PL4
- Date: Mon, 28 Dec 1992 11:04:22 GMT
- Lines: 28
-
- Hi,
-
- Is there a _faster_ way, besides doing a counting on
- number of intersections from the point to infinity (assumed),
- to test a point whether it's inside a polygon?
-
- It's because I have to doing (almost) cross product in order
- to find out an intersection and it's too expensive.
-
- Specifically, I'm doing pattern filling (and make a _real_ object
- of it) and e.g. I've a circle, which is represented by 72 points.
- A pattern is a very small area, as we expected, to be repeated
- itself and fill the whole area. (likewise, my pattern is also
- represented by points, once defined, I never know, visually, its
- shape).
-
- All in all, I do need to know _each_ point whether its inside
- or not...(that's I hate, because it's real slow, c'os when
- a pattern is really wholly within the region, I still have
- to test ALL the points...)
-
- Any comments?
-
- --
- Medusa
- University of Hong Kong
- H8915726@hkuxa.hku.hk
-
-