partitioning a directed line segment