V
V
Vitaly Siryk2015-12-10 20:10:40
Programming
Vitaly Siryk, 2015-12-10 20:10:40

Is the point in an arbitrarily drawn figure?

You need to find out if the point is in the circled area. There is an array of line points.
70f4a56a66e74fe0ad9db6a1804447ca.PNG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Immortal_pony, 2015-12-10
@GProg

In the simplest case, you can build a circle and then look for the occurrence of a point in it:
where x and y are the coordinates of your point, x0 and y0 are the coordinates of the center of the circle, R is the radius of the circle, ^2 is squaring. If the condition is met, then the point is inside (or on the circle, if the left and right sides are equal). If not, then the point is outside the circle.
If, nevertheless, an arbitrary contour is needed, then this article describes an algorithm for determining whether a point falls into an arbitrary contour. Also, you can read about the question on Wikipedia .

D
DDDsa, 2015-12-11
@DDDsa

Located.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question