开发者

Find lines crossings algorithm [duplicate]

开发者 https://www.devze.com 2023-02-11 00:03 出处:网络
This qu开发者_如何转开发estion already has an answer here: Closed 11 years ago. Possible 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

精彩评论

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