Polygon enclosing a set of points

Laurent K picture Laurent K · May 6, 2009 · Viewed 32.4k times · Source

I have a set S of points (2D : defined by x and y) and I want to find P, the smallest (meaning : with the smallest number of points) polygon enclosing all the points of the set, P being an ordered subset of S.

Are there any known algorithms to compute this? (my lack of culture in this domain is astonishing...)

Thanks for your help

Answer

Ralph M. Rickenbach picture Ralph M. Rickenbach · May 6, 2009

There are many algorithms for this problem. It is called "minimum bounding box". You will find solutions too searching for "convex hull", especially here.

One way is to find the leftmost point and then repeat to search for a point where all other points are to the right of the line p(n-1)p(n).