Solved

Find the Concave Polygon

Posted on 2004-08-26
16
350 Views
Last Modified: 2012-06-21
Hi Math Experts,

Here's my question

How do you calculate the concave boundary of a set of x,y coordinates that passes through the maximum number of points?

I was able to find lots of documentation online for finding the CONVEX boundary for a set of points, but I can't seem to find

anything on CONCAVE boundaries.

-CPOsosky

0
Comment
Question by:CPOsosky
  • 7
  • 6
  • 2
  • +1
16 Comments
 
LVL 13

Accepted Solution

by:
SteH earned 300 total points
ID: 11904387
This might be because the convex hull is unambigiuos whereas the concave hull is not. You need to develop some ideas on when to use points lying inside the convex hull or which of them.

A first idea is to use a point inside if it is nearer to one of the boundary than the next on the boundary. Try expermenting.
0
 
LVL 84

Expert Comment

by:ozo
ID: 11904781
Couldn't you find a concave boundary that passes through all the points?
0
 
LVL 9

Expert Comment

by:rjkimble
ID: 11904789
This is basically a traveling salesman problem. If you find the shortest path through all the points, that path will necessarily be a polygon (i.e., no intersecting edges). I think you'll find numerous techniques for constructing such polygons if you look at algorithms for traveling salesman problems.
0
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 13

Expert Comment

by:SteH
ID: 11904796
It might pass through all points and some even several times. But is this still a hull?
0
 
LVL 13

Expert Comment

by:SteH
ID: 11904805
A hull doesn't need to pass through all points. And it has to be closed unlike the traveling salesman.
0
 
LVL 9

Expert Comment

by:rjkimble
ID: 11904812
>> Couldn't you find a concave boundary that passes through all the points?

Yes. It's really just a TSP, as I just indicated in my other comment. Sometimes it's very frustrating to have other comments pop up while writing your own. I don't see a solution to that problem, however.
0
 
LVL 9

Expert Comment

by:rjkimble
ID: 11904841
Well, I'm talking about a closed trip traveling salesman problem. A minimum length cycle through all the points will necessarily be a polygon with no intersecting edges.
0
 
LVL 13

Expert Comment

by:SteH
ID: 11904896
@rjkimble
But a concave boundary or hull doesn't need to pass through all points. Just all points need to be within. And thats the problem for it: When to choose a point to be part of the boundary or just contained.
0
 
LVL 9

Expert Comment

by:rjkimble
ID: 11904999
Here's a link to a page about the traveling salesman problem with lots of other links:

http://www.ing.unlp.edu.ar/cetad/mos/TSPBIB_home.html

@SteH

The original question is looking for a boundary that passes through the maximum number of points. Well, a shortest-length Hamiltonian circuit will necessarily be a polygon that passes through ALL the points (can't do better than that) and whose edges don't intersect. Traveling salesman problems are all about finding such cycles. Although finding a solution to a TSP is hard, finding Hamiltonian circuits whose edges don't intersect is quite straightforward. Such techniques abound in the literature of traveling salesman problems.
0
 
LVL 13

Expert Comment

by:SteH
ID: 11910360
I agree that if you want to find a polygon through all points it is a TSP, no doubt. And reading the question again I get some doubt about the meaning of it. The maximum number of points are definitly all. But why not saying through all points then, if there wasn't a choice to choose less. And if you are talking about boundaries it is not very intuitive to use all points for their boundary. And it contradicts what one would use the word boundary for, generally and not "math scienctificly" speaking.
0
 
LVL 9

Expert Comment

by:rjkimble
ID: 11913012
To tell the truth, I have no idea what CPOsosky is looking for. I hope he responds and gives a bit more detail. Nonetheless, it's pretty simple to create a polygon through all the points, and if that's what he's after, we have provided sufficient information for him to do so.
0
 
LVL 13

Expert Comment

by:SteH
ID: 11913052
I think he is looking for the green shape in http://ksfltd.com/products.htm#6. The yellow one is the convex hull and the green a concave one.
0
 
LVL 9

Expert Comment

by:rjkimble
ID: 11913161
Excellent reference. I see your point. If that's the case, I have no good ideas offhand. I suspect that's a fairly complicated problem.
0
 

Author Comment

by:CPOsosky
ID: 11913377
Steh's reference is exactly what I'm looking for.

The problem is the arbitrary shape of the concave polygon that leads to multiple solutions.

The left side of the green figure could have just as easily been drawn using several of the internal points,

creating several "dents" on the left side.

-CPOsosky
0
 
LVL 9

Expert Comment

by:rjkimble
ID: 11913494
I suspect that you have a bit of a challenge. My cursory search for concave hull returns only that reference, and those Russian mathematicians/programmers are pretty clever folks -- I suspect that the algorithm they're using hasn't been published anywhere, and reinventing it could be tricky.
0
 

Author Comment

by:CPOsosky
ID: 11931588
Since the consensus seems to be that there's no easy solution to this problem,

I'm going to go ahead and close out the question.

Points go to Steh for effort.

Thanks everyone!

-CPOsosky
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linear independence 9 35
C#: Compare two audio files and calculate matching percentage 6 545
Geomentry-Fundamental concepts 6 66
Geomentry-Fundamental concepts-Angles 3 72
Introduction On a scale of 1 to 10, how would you rate our Product? Many of us have answered that question time and time again. But only a few of us have had the pleasure of receiving a stack of the filled out surveys and being asked to do somethi…
Complex Numbers are funny things.  Many people have a basic understanding of them, some a more advanced.  The confusion usually arises when that pesky i (or j for Electrical Engineers) appears and understanding the meaning of a square root of a nega…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question