Classifying segments inside triangles