我知道如何计算convex_hull,但如何获得创建convex_hull的线段列表?
发布于 2015-01-08 20:06:36
看起来它基本上解释了如何在算法的注释中?
Output: a list of vertices of the convex hull in counter-clockwise order,
starting from the vertex with the lexicographically smallest coordinates.所以如果它做了它承诺的事情,你可以简单地从第一个顶点开始,并将它连接到下一个顶点,依此类推,直到你将最后一个顶点连接到第一个顶点。
您可以确定没有一条线穿过主体,因为这些线是组成凸包的顶点,并按逆时针顺序列出。
https://stackoverflow.com/questions/27839394
复制相似问题