algorithm - 查找线交叉点算法

标签 algorithm geometry computational-geometry

Possible Duplicate:
Find the Intersection Points of All the Line Segments

嗨,

我有一组由 2 个点定义的线。您能给我推荐一种可以找到所有交叉点的快速算法吗?

谢谢

最佳答案

如果您指的是线段,您可以使用 Bentley-Ottmann algorithm它查找 O((n+k)*log(n)) 中的所有交叉点,其中 k 是交叉点总数,n 是您的集合中的段数。

关于algorithm - 查找线交叉点算法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4997071/

相关文章:

algorithm - 将数组拆分为四个框,使框的异或之和最大

algorithm - 在 100 个不同的文件中找到前 10 个整数

algorithm - 在 O(n) 时间内计算星形多边形的凸包

algorithm - 网格划分的快速算法是什么?

python - 如何实现二叉树?

algorithm - 仅具有不同列的矩阵排名

opengl - 在 OpenGL 中绘制莫比乌斯带

java - OpenGL + 处理 : Rotate and move based on direction

wpf - 轨道动画

algorithm - 用最少的矩形填充多边形