Thread: How to get data inside polygon or test if a point is inside or not

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    1

    Question How to get data inside polygon or test if a point is inside or not

    Hii friends
    Help me out.. I have a program which asks the user to enter set of points.Based on this set of points the user should enter the x,y coordinates of the points which form a polygon. Now i have few points inside & outside the polygon..How to display the points or (x,y) coordinates of the point which is thier only inside the polygon comparing the polygon points. Please help me out
    for triangle i can test if its inside & display the point but i am not getting for polygon..Please help me out..I am tryin past one week not getting...

    For example:
    the user
    enters points as 7 & the x,y coordinates of it as
    2,4
    3,1
    6,4
    5,2
    8,4
    7,6
    2,4

    This points form a polygon
    Now thier are some points which i should check if its inside the polygon or not & display it.
    For the above example the points inside polygon are
    3,3
    6,3
    & outside are
    4,5
    7,3
    So when i check it wil display this value & tel inside if its inside or outside if its outside.. I want program like this..
    please please help me out..
    This a simple example.
    I have huge data or set of points to check if its iside a region or not..
    So it would be helpful i get this program so that i can try for my huge data.
    Help me out

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I bet if there were some sort of ... network ... maybe of computers ... yeah, that's a good start ... with like a way to search for things ... let's call it a "search engine" ... Oh that's a good one, I should totally copyright that! ... then we could type words in ... is patent the word I'm looking for? ... I should totally search for that on my "search engine" ... Oh, right, rambling. So... you could put these words in ... like key words ... oh, that's a good one too! Key words in a search engine! I'm like a buzz word genius! ... Right. Buzz words in a search engine, and you could like type "points in a polygon" and push like a button ... and BAM! TOTALLY GET A ... LINK! YEAH A LINK TO WHAT YOU SEARCHED FOR! BAM BAM BAM!!

    Point in polygon - Wikipedia, the free encyclopedia


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. parent in a binary search tree
    By roaan in forum C Programming
    Replies: 4
    Last Post: 08-26-2009, 07:08 PM
  2. question about a working linked list
    By cold_dog in forum C++ Programming
    Replies: 23
    Last Post: 09-13-2006, 01:00 AM
  3. How accurate is the following...
    By emeyer in forum C Programming
    Replies: 22
    Last Post: 12-07-2005, 12:07 PM
  4. Can a pointer point to different data structure?
    By franziss in forum C Programming
    Replies: 9
    Last Post: 09-04-2005, 11:51 AM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM