I have a list of points (x,y) I need to be able to determine the order of points along a best fit line.
AS shown in the picture I want them to be in the order 1,2,3 even though the x-coordinate is in the order x3,x1,x2 (I know the y-coordinate looks like the order I want but that is just this example)
If I have a line aX + bY + c=0, is there a way of finding a point normal to the line that passes through point(X1,Y1) ?
Looked at regression algorithms but they just seem to give me the line.