Find the midpoint of a line segment