Dividing a segment into several equal parts