【发布时间】:2016-03-26 23:25:37
【问题描述】:
我正在尝试实现 De Berg 等人的 Computational Geometry 书中的可见性图算法。你可以在这里找到算法:http://cs.smith.edu/~streinu/Teaching/Courses/274/Spring98/Projects/Philip/fp/algVisibility.htm
VISIBLE 算法的第一行有问题:
if pwi intersects the interior of the obstacle of which wi is a vertex, locally at wi then return false
这本书指出它应该花费 O(lg n) 时间(其中 n 是平面上的所有点),但它没有解释如何进行检查。我发现的算法需要与多边形顶点数相关的线性时间。
感谢任何帮助。
【问题讨论】:
-
那么问题是什么?
-
他/她想知道如何在 O(log n) 时间内完成。但我认为这是不可能的。
标签: algorithm geometry 2d computational-geometry