I’ve been trying for quite some time to triangulate an area of points with a few polygons which must be hollowed up in the area. I’m using ConstrainedDelaunay2D as the basis of my implementation but the best I could reach so far is:
So far, I’ve tried different winding of points in polygons (CW/CCW), and changing “Alpha”, “Offset” and “Tolerance” (At this point I was shooting for anything!) but didn’t really help.
if you start with polygons maybe you can shrink them with vtkShrinkFilter to make the delauney filter work better (?)
If you start from an image you can maybe threshold it into a mesh:
Thanks @marcomusy for your suggestion and your nice representation. However, the screenshot is taken from a Matlab visualization and I’m currently using C++ interface of VTK to implement a general visualization tool for our future simulations.
I’m using coordinates of points to create polygons and add field data in the next step to run delaunay on the area. Here’s what I’ve got so far:
First I fill the points container with my grid points- the ones which are going to have field data (initialized by zero) and add vertices of blocks (which I wish to cut them out from the final map) and then input field data at each time step in the loop. Finally I run delaunay and output the data.
It also throws this warning while writing data:
vtkDelaunay2D.cxx:1409 WARN| vtkDelaunay2D (0x39ac870): Edge not recovered, polygon fill suspect