9

Is there any existing Bentley-Ottmann Algorithm Implementation/library in C# or Java?

5
  • 1
    take a look at here ...stackoverflow.com/questions/4490331/… Commented Nov 13, 2011 at 17:34
  • Did you ever get this fully working? The Java implementation link is dead now. Commented Aug 22, 2013 at 11:54
  • What output are you expecting from the implementation? Commented Aug 2, 2015 at 4:21
  • Not C# or Java, but heres a single-file implementation you could port stackoverflow.com/a/33199826/432509 Commented Oct 18, 2015 at 15:59
  • Has anyone sighted a public C# implementation yet? Thank you! Commented Aug 4, 2019 at 15:12

3 Answers 3

4

Here is at least a C++ implementation (including description): http://softsurfer.com/Archive/algorithm_0108/algorithm_0108.htm

Sign up to request clarification or add additional context in comments.

1 Comment

While technically this is a bentley-ottmann implementation, its only returning true/false. Not finding all intersection points.
1

Here is a Java implementation of the Bentley-Ottman algorithm

1 Comment

0

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

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
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.