Calculation of an irregular-shaped border in the Cartesian coordinate 2D

I am looking for a solution to calculate an irregularly shaped border.

Lats take a look at an example area: Simple square

if I Minimum x and yand Maximum x and the ylike:

MaxX = 5
MinX = 1
MaxY = 5
MinY = 1

in python language:

#Python Code
X = {"Min":1, "Max":5} # is Dictionary of x Axis
Y = {"Min":1, "Max":5} # is Dictionary of y Axis

I can check if there is any coordinate on the square border or not, simply by comparing the axis with min and max of the square border.

now look at these 2 irregular examples: enter image description here enter image description here

Now, how can I calculate the border and shape coordinates? I have a point coordinate, but I do not have the coordinates inside the figure and the coordinates of the lines that connect each point of the figure.

:, Point-in-Polygon, , , , .

:, , , , - , , , .

+3
1

, p >

+2

Source: https://habr.com/ru/post/1625976/


All Articles