Equation of a line in two dimensional plane is ax + by + c = 0
How to find coefficients {a, b, c}?
We can find them by simplifying and modifying this:
after:
(x - x1)(y2 - y1) = (y - y1)(x2 - x1)
x(y2 - y1) - x1(y2 - y1) = y(x2 - x1) - y1(x2 - x1)
(y2 - y1) * x + (x1 - x2) * y + y1(x2 - x1) + x1(y2 - y1) = 0
a = y2 - y1
b = x1 - x2
c = - by1 - ax1
It is all...