Answer the question
In order to leave comments, you need to log in
Is there a simple math for hitting a zone?
What is the math for hitting any zone - ABCDE green cross?
The coordinates of the blue dots are known.
The programming language is not important. Thanks to everyone who replies.
Answer the question
In order to leave comments, you need to log in
https://e-maxx.ru/algo/pt_in_polygon
https://neerc.ifmo.ru/wiki/index.php?title=%D0%9F%...
algolist.ru/maths/geom/belong/poly2d .php
You've already been given general advice. Now specialized.
The point is guaranteed to be in the enclosing rectangle. We get the equations of lines and look from which side. The easiest way to do this is through the skew product of vectors — AX×AB <> 0, or
(x − xA)(yB − yA) − (xB − xA)(y − yA) <> 0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question