互相垂直两直线斜率的乘积=-1
kAB*kCB=-1
(b-n)/(a-m) * (y-n)/(x-m) = -1
(a-m)(x-m)+ (b-n) (y-n) = 0
y-n = - (a-m)(x-m)/(b-n) .(1)
又:BC=L,即BC^2 = L^2:
(x-m)^2+(y-n)^2 = L^2 .(2)
将(1)代入(2):
(x-m)^2 + {-(a-m)(x-m)/(b-n)}^2 = L^2
(x-m)^2{1+(a-m)^2/(b-n)^2} = L^2
(x-m)^2 = L^2(b-n)^2 / [(a-m)^2+(b-n)^2]
x-m = ±L(b-n) /√[(a-m)^2+(b-n)^2]
x1= m - (b-n) /√[(a-m)^2+(b-n)^2]
x2= m + (b-n) /√[(a-m)^2+(b-n)^2]
y-n = - (a-m)(x-m)/(b-n)
y1 = n + L(a-m) /√[(a-m)^2+(b-n)^2]
y1 = n - L(a-m) /√[(a-m)^2+(b-n)^2]