【发布时间】:2015-06-20 19:20:20
【问题描述】:
我正在尝试实施 Delaunay 三角测量。但是,我似乎在创建重叠三角形的边缘时遇到了问题:
我的实现基于this 网站上的描述。我只是使用蛮力循环来检查集合中是否已经存在边缘。
v = vertex to be added
edgeBuffer = [];
for each triangle
if v is in the triangle's circumscribed circle
for each edge in the triangle
check if it's already in edgeBuffer
if not, add it
remove triangle
我怀疑这是我算法的另一部分出错并导致这种情况发生,但我已经以非常简单的方式实现了所有内容。这段代码有什么问题? Fiddle
【问题讨论】:
标签: javascript delaunay