Distance from a point to a line

d = l sinθ


l =|y0 - (-ax0 - c)/b|

  =|ax0 + by0 + c|/|b|


sinθ = |b|/√(a^2 + b^2)


therefore  

d = |ax0 + by0 + c|/√(a^2 + b^2)

Write a comment

Comments: 5