M
M
merkulov02020-11-17 22:18:23
Python
merkulov0, 2020-11-17 22:18:23

Python. Find the distance from a point to a line, knowing the coordinates of this point?

The coordinates of the line and some point on the plane are known. How to find the shortest distance between this line and a point?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2020-11-17
@wataru

Make an equation of a straight line of the form a*x+b*y+c=0.
Substitute the coordinates of the point into this equation. Take modulo and divide by sqrt(a^2+b^2).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question