home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / graphics / 13215 < prev    next >
Encoding:
Text File  |  1992-12-28  |  1.2 KB  |  40 lines

  1. Newsgroups: comp.graphics
  2. Path: sparky!uunet!munnari.oz.au!hp9000.csc.cuhk.hk!hkuxb.hku.hk!h8915726
  3. From: h8915726@hkuxb.hku.hk (Medusa)
  4. Subject: Point inside an enclosed region
  5. Message-ID: <BzyurB.F19@hkuxb.hku.hk>
  6. Reply-To: h8915726@hkuxa.hku.hk
  7. Organization: University of Hong Kong
  8. X-Newsreader: Tin 1.1 PL4
  9. Date: Mon, 28 Dec 1992 11:04:22 GMT
  10. Lines: 28
  11.  
  12. Hi,
  13.  
  14.     Is there a _faster_ way, besides doing a counting on 
  15.     number of intersections from the point to infinity (assumed),
  16.     to test a point whether it's inside a polygon?
  17.  
  18.     It's because I have to doing (almost) cross product in order
  19.     to find out an intersection and it's too expensive.
  20.  
  21.     Specifically, I'm doing pattern filling (and make a _real_ object
  22.     of it) and e.g. I've a circle, which is represented by 72 points.
  23.     A pattern is a very small area, as we expected, to be repeated
  24.     itself and fill the whole area. (likewise, my pattern is also
  25.     represented by points, once defined, I never know, visually, its
  26.     shape).
  27.  
  28.     All in all, I do need to know _each_ point whether its inside
  29.     or not...(that's I hate, because it's real slow, c'os when
  30.     a pattern is really wholly within the region, I still have
  31.     to test ALL the points...)
  32.  
  33.     Any comments?
  34.  
  35. --
  36. Medusa
  37. University of Hong Kong
  38. H8915726@hkuxa.hku.hk
  39.  
  40.