derivative of ((x-a) c+(y-b) d)/sqrt((x-a)^2+(y-b)^2) with respect to d