J
J
jetmax2020-04-27 18:30:16
Mathematics
jetmax, 2020-04-27 18:30:16

Is there a simple math for hitting a zone?

5ea6fa313382f900347828.png
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

2 answer(s)
T
Timur Pokrovsky, 2020-04-27
@jetmax

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

M
Mercury13, 2020-04-27
@Mercury13

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 question

Ask a Question

731 491 924 answers to any question