Adding Shamos-Hoey algorithm for finding segments intersections.