This is my very horrific attempt to implement the Shamos and Hoey intersection algorithm. The algorithm is defined in the paper Geometric Intersection Problems (1976).
- For the love of god, don't re-sort the array each time you insert. There's gotta be an O(n) way to do it???
- Verify the algorithm more (I don't actually know if it's correct)
- Next, implement the Bently and Ottmann optimizations