implemented partially self intersection
the only function needing implementation is the intersection between two
line segments