I have a cloud of 2D points and I would like to calculate the perimeter of a polygon which encompasses all of them.
Is there a name for this mathematical process which I can Google or can someone tell me how to start thinking about the problem, please?
You're probably looking for the convex hull and for convex hull algorithms.
One of the simplest 2D algorithms is the Gift wrapping algorithm. To quote Wikipedia:
It has O(nh) time complexity, where n is the number of points and h is the number of points on the convex hull. Its real-life performance compared with other convex hull algorithms is favorable when n is small or h is expected to be very small with respect to n. In general cases the algorithm is outperformed by many others.
So depending on the size of your problem, you might need to take a look on the algorithms page linked above in order to find more advanced approaches.
One well-defined such polygon is the convex hull. There are several well-studied algorithms for finding convex hulls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With