Results 1 to 3 of 3

Thread: [RESOLVED] Point in Polygon

  1. #1
    Fanatic Member Strider's Avatar
    Join Date
    Sep 04
    Location
    Dublin, Ireland
    Posts
    612

    Resolved [RESOLVED] Point in Polygon

    Whats the best way to check to see if a point exists in a polygon.


    my shape is looks like the following
    Code:
              _____
            /       |
           |        |
           |        |
           |        |
           |        |
            \_____|
    i need to determine if i have clicked within this shape
    Last edited by Strider; Jan 25th, 2005 at 10:16 AM.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 02
    Location
    Bristol, UK
    Posts
    35,548

    Re: Point in Polygon

    There are a few threads around that have working solutions, there's a good discussion of a few methods here (including one of mine):
    http://www.vbforums.com/showthread.php?t=244049

    Depending on how you have your program working so far, there is also the API PtInRegion. There are a few threads about it on this site, a search should give you several examples

  3. #3
    Noodly Appendage wossname's Avatar
    Join Date
    Aug 02
    Location
    #!/bin/bash
    Posts
    5,645

    Re: Point in Polygon

    Quote Originally Posted by Strider
    Whats the best way to check to see if a point exists in a polygon.


    my shape is looks like the following
    Code:
              _____
            /       |
           |        |
           |        |
           |        |
           |        |
            \_____|
    i need to determine if i have clicked within this shape
    Here is all the code you need. It's much faster than PtInRegion and it doesn't require the API....

    http://support.microsoft.com/kb/q121960/
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •