I have a set of points on a plane, and I want to find all convex polygons without including points in them.
For example, I want to find all the triangles, all four sizes of polygons, all four five-dimensional polygons, and so on, until they cannot be found without including points in them.
In the image, line a corresponds to convex polygons of size 3. Columns 1 and 2 give the correct examples of what I want, column 3 shows a triangle that includes two points inside it, I donβt want to.
Lines b and c show examples of polygons of sizes 4 and 5.
b3 shows an example of a non-convex polygon

I wonder if there is a function in MATLAB or in any other language, or if someone knows about an algorithm that can do this.
The algorithm could receive, in addition to points, the size of the polygons to search, it would return all possible regular polygons or empty if it does not contain a polygon of this size.
I appreciate the help.
source share