A Segmentation Algorithm for Line Drawings