Is there any existing Bentley-Ottmann Algorithm Implementation/library in C# or Java?
-
1take a look at here ...stackoverflow.com/questions/4490331/…Glory Raj– Glory Raj2011-11-13 17:34:02 +00:00Commented Nov 13, 2011 at 17:34
-
Did you ever get this fully working? The Java implementation link is dead now.Evan Parsons– Evan Parsons2013-08-22 11:54:20 +00:00Commented Aug 22, 2013 at 11:54
-
What output are you expecting from the implementation?ideasman42– ideasman422015-08-02 04:21:23 +00:00Commented Aug 2, 2015 at 4:21
-
Not C# or Java, but heres a single-file implementation you could port stackoverflow.com/a/33199826/432509ideasman42– ideasman422015-10-18 15:59:45 +00:00Commented Oct 18, 2015 at 15:59
-
Has anyone sighted a public C# implementation yet? Thank you!Jeremy Tammik– Jeremy Tammik2019-08-04 15:12:27 +00:00Commented Aug 4, 2019 at 15:12
Add a comment
|
3 Answers
Here is at least a C++ implementation (including description): http://softsurfer.com/Archive/algorithm_0108/algorithm_0108.htm
1 Comment
ideasman42
While technically this is a bentley-ottmann implementation, its only returning true/false. Not finding all intersection points.
Here is a Java implementation of the Bentley-Ottman algorithm
1 Comment
ideasman42
Java link is still available here: web.archive.org/web/20040329071207/http://www.solyanik.com/…
The implmentation at softsurfer.com is the Shamos-Hoey algorithm to decide if there is at least one intersection. And, if one is found, it stops. The code at the reference is for testing if a polygon is simple.
2 Comments
Andres Gardiol
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
user2924198
I was the author of that code, and that is my website. The website has been converted to a book, and this code is no longer available online, As for the code you are discussing, it was for the Shamos-Hoey algorithm which historically preceded the Bentley-Ottman. Shamos-Hoey was for testing if a polygon is simple, so it only returns true or false. It stops as soon as it finds one intersection.