(Px,Py)=(Ax,Ay)+L(Ay-By,Bx-Ax)/S

S^2=(Ay-By)^2+(Ax-Bx)^2