Fixed line segmentation - now calculates intersections using a modified split merge algorithm