Modify the output of final results to make the output file include the following info:

the coordinate of the starting point, the coordinate of end point and the gradient and intercept of the corresponding line.