This apply to find the intersection point of the line and a line segmention. Will be used in the shear multipler calculation of with PLYSHLOG. Solver is not the best place to put this function, while need suggestion and fixed later.