bentley-ottman:Bentley-Ottman扫行算法在js中的实现

时间:2021-05-06 09:32:04
【文件属性】:
文件名称:bentley-ottman:Bentley-Ottman扫行算法在js中的实现
文件大小:60KB
文件格式:ZIP
更新时间:2021-05-06 09:32:04
algorithms computational-geometry bentley-ottmann JavaScript 本特利-奥特曼扫斗绳 这是适用于Node.js和浏览器的Bentley-Ottman掠过线算法实现。 它找到一组2D线段中的所有交点,在内部使用平衡的avl树。 var findIntersections = require ( 'bentley-ottman-sweepline' ) ; var segments = [ [ [ 0 , 1 ] , [ 3 , 1 ] ] , [ [ 2 , 0 ] , [ 2 , 2 ] ] ] console . log ( findIntersections ( segments ) ) ; 细分可追溯性 JavaScript中提供了该算法的几种实现方式,请参见。 这既不是最快的,也不是最可靠的(众所周知,它会因多个笛卡尔相交而失败;这显然可以通过一点点TLC来解决)。 综上所述,该特定实现是唯一提供段可追溯性的实现。 也就是说,您
【文件预览】:
bentley-ottman-master
----index.js(100B)
----package.json(1KB)
----tests()
--------intersection.test.js(1KB)
--------geometry.test.js(2KB)
--------queue.test.js(608B)
--------comparison.test.js(3KB)
--------testres.js(478B)
--------arrays.test.js(555B)
----LICENSE(1KB)
----package-lock.json(133KB)
----src()
--------findIntersections.js(5KB)
--------point.js(208B)
--------utils()
--------sweepline.js(261B)
----.gitignore(51B)
----demo()
--------css()
--------index.html(1KB)
--------js()
----README.md(2KB)

网友评论