Add line segment intersection code to Shapes