algorithm - Find all polygons in points using MATLAB -
I have a set of points in the plane and I want to search without any cones without convex polygons.
For example, I would like to meet all the triangles, all four-shaped polygons, all four of five size polygons and so on unless it is possible to meet them without any point in them.
In the image, the row corresponds to the polygon of the line one size 3. While the columns 1 and 2 show the correct example of what I want, column 3 shows a triangle in which it consists of two points, which I do not want.
Show examples of polygons of sizes 4 and 5 of rows b and c .
B3 Example of a non convex polygon
I wonder if there is a function in MATLAB or any other language or if someone knows about algorithms who can do this.
The algorithm may be obtained, to find the size of polygons, next to the point, it can possibly return the right polygon or empty if the polygon of that size is not there.
I appreciate the help.
Step 1: Make a delaunay-triangulation of points.
Step 2:
- For polygons of size 3: Resultant triangle results are
- For polygons of size 4: sharing two corners Select the three triangles of the shape
- For polygons of size, select a polygon of 5: 4 and add it to a triangle which shares the two corners
Comments
Post a Comment