Polygon enclosing a set of points

后端 未结 4 675
执念已碎
执念已碎 2020-11-29 03:15

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

4条回答
  •  粉色の甜心
    2020-11-29 04:01

    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).

提交回复
热议问题