Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Finding a polygon that encloses a set of points

Finding a polygon that encloses a set of points

Scheduled Pinned Locked Moved Algorithms
questiongraphics
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gantww
    wrote on last edited by
    #1

    Greetings, I'm trying to determine the best way to get a polygon from a set of points. The points are not in any particularly useful order (they are the endpoints of individual lines that fill the polygon in question). How can I easily take such a set of points and figure out the vertices of a polygon from them? The polygons may have gaps inside of them. Any ideas? Thanks, Will PS. Sorry about the repost from the Graphics forum. I wasn't sure whether to put it here or there, but was informed that here was a better choice.

    L E 2 Replies Last reply
    0
    • G gantww

      Greetings, I'm trying to determine the best way to get a polygon from a set of points. The points are not in any particularly useful order (they are the endpoints of individual lines that fill the polygon in question). How can I easily take such a set of points and figure out the vertices of a polygon from them? The polygons may have gaps inside of them. Any ideas? Thanks, Will PS. Sorry about the repost from the Graphics forum. I wasn't sure whether to put it here or there, but was informed that here was a better choice.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      A quick search of the codeproject site turned up this: Convex Hull[^] Best Wishes, -David Delaune

      1 Reply Last reply
      0
      • G gantww

        Greetings, I'm trying to determine the best way to get a polygon from a set of points. The points are not in any particularly useful order (they are the endpoints of individual lines that fill the polygon in question). How can I easily take such a set of points and figure out the vertices of a polygon from them? The polygons may have gaps inside of them. Any ideas? Thanks, Will PS. Sorry about the repost from the Graphics forum. I wasn't sure whether to put it here or there, but was informed that here was a better choice.

        E Offline
        E Offline
        ely_bob
        wrote on last edited by
        #3

        This is a really dificult... perspective... if the shape is solid(with enclosed points) then you can use a contracting concentric circle approach. if you have a form of wrapping region... good luck(unless there is other structure to your data that you didn't include) I recently did something similar (the convex polygon approach to making a vooroni tesselation(delanuy triagulation)). you can alternativly use a line crossing approach, but this is also tricky. it is best if the points are "ordered" either inpriciple, or by allowence, and then building up the polygon vertex(pair) by vertex(pair).

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups