Red-Black Trees in JavaScript - Update
Sunday, April 4th, 2004I’ve started to implement the Bentley-Ottmann algorithm which is used to fairly efficiently identify all intersection points between a set of lines. I’ll be using it to improve my current brute-force polygon-polygon intersection code.
I finished up a close variant of Bentley-Ottmann today: the Shamos-Hoey algorithm. As a result of that work, I had to improve my Red-Black Tree implementation. You can find the latest implemenation of my JavaScript Red-Black Trees here on my Utilities page.
I found out that there are some special cases that Bentley-Ottmann doesn’t handle correctly. I think I’ve found a good solution to all of those exceptions. Once I feel the code is reasonably correct, I’ll post it to the site.