Here’s my problem background: I have a surface mesh and I have a list of vertices (these vertices are generated by intersect the surface mesh with another mesh, using CGAL
) shown as blue dots as follows:
As the vertices are too close, I want to filter these vertices such that the remain vertices has a distance of roughly the target edge length(the first neighboring vertex that has a distance larger than target edge length).
To get what I want , I think the first step should rearrange the vertices as these vertices are stored randomly in a vector; then calculate the distance between the ith vertex and i+1th vertex, and filter the vertices that are too close. But I dont know how to implement these.
Or if you have a better algorithm, could you help me solve this issue.
I appreciate if anyone could solve it. Thank you.
I use C++ and CGAL to implement this
2