开发者

Find lines crossings algorithm [duplicate]

This qu开发者_如何转开发estion already has an answer here: Closed 11 years ago.

Possible Duplicate:

Find the Intersection Points of All the Line Segments

Hi,

I have a set of lines defined by 2 points. Could you please recommend me a fast algorithm which finds all the crossings?

Thanks


In case you mean line-segments, you can use the Bentley-Ottmann algorithm which finds all crossings in O((n+k)*log(n)) where k is the total numer of crossings and n is the number of segments in your set.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜