adds connections based on intersecting lines