+ Reply to Thread
Results 1 to 2 of 2

Thread: Polygon and point

  1. #1
    Surfer is offline Senior Member
    Join Date
    Mar 2010
    Posts
    321

    Polygon and point

    Given a polygon and a point, you have to find that whether the point is inside the polygon or outside.
    (Assume convex polygon)

    Give your logic for this.

  2. #2
    game.iiith Guest
    shoot a ray towards the right side (+ve x axis) from the point. If that ray intersects odd times with the sides of the polygon then the point is inside else outside.

    Avi
    http://avidullu.wordpress.com

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Intersection point of two linked lists
    By TopGun in forum Amazon
    Replies: 3
    Last Post: 2nd July 2010, 02:18
  2. Replies: 0
    Last Post: 22nd September 2009, 11:59
  3. Can you point out some differences between new & malloc?
    By TopGun in forum C++ Fundamentals
    Replies: 0
    Last Post: 5th June 2008, 15:09

Tags for this Thread

Bookmarks

Posting Permissions

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