The area that contains the dots?

Does anyone know if there is an algorithm for this? I have several two-dimensional points. I need to find a list of points that, when you draw a line from point n to point n + 1, you get an area containing all the points. If I could attach an image, I could explain myself better. Thanks in advance.

+3
source share
3 answers

What you are looking for is probably a convex hull. Wikipedia has a picture . There are several algorithms for calculating a convex hull. Graham scan probably provides the best balance between performance and ease of implementation.

+7
source

, , , . Google, .

, .

, , (, ), .

+3

If you code in C / C ++ (or understand them), this is a great source of geometry algorithms - both the source and the explanation.

0
source

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


All Articles