简体   繁体   中英

Finding the concave hull of a set of points such that every point is in the boundary

So I am attempting to make complex polygons from a set of randomly generated vertices in 2D. I would like to allow concave polygons to exist, as well as to assure that every vertex in the set is included in the boundary (so the algorithm must be able to handle convex AND concave hulls), and also assure that the lines created by the boundary never intersect. Every version of a concave hull generating algorithm has assumed that it is acceptable to have varying levels of concavity, and that some points may not be a part of the boundary.

I feel like this may be a much simpler problem than it seems to me, but I cant figure out how to make sure I can order the vertices in such a way that drawing a line between vertices having adjacent indices in the list makes a polygon conforming to those standards. For a convex hull it is easy to just find the centroid of the polygon and sort the vertices by their polar angle respective to it, but I am currently unaware of an equivalent idea for concave.

i am pretty sure you dont need this answer anymore, but for my bachleor thesis i had to come up with a solution to this problem with a twist. I had to render a set of randomized points basically to a concave hull. I used the marching cubes algorithm generating A concave hull, Contact me if you want a code example, but basically i just counted and weighed each point reveived. and computed edgeindeces for rendering them depending on my value grid. https://stemkoski.github.io/Three.js/Marching-Cubes.html i oriented my self on this implementation.... have fun:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM