How to find an arbitrarily oriented minimum bounding box in c++

后端 未结 5 725
不知归路
不知归路 2021-02-06 23:58

So let\'s say I have a list of N pairs of positive long coordinates (points).
How do I find the smallest rectangle containing all of them?
The rectangle can also have fl

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-07 00:53

    This wikipedia page notes that you can solve this problem by using the fact that the minimum rectangle must have an edge collinear with one of the edges of the convex hull.

提交回复
热议问题