am working on an algorithm for procedural generation of 3D meshes for caves in a side-scroller game.
The idea is that each of those anchor points has a distance to the view-pane depending on their distance to the contour. This way the caves have a roughly spherical shape in 3D.
This is also the reason I added those anchor points because having triangles from wall-to-wall would not enable me to have actual 3D caves.
Obviously this algorithm is not aware of what's inside my cave and what is not and thus forms triangles completely outside of the caves. Pruning those outliers does not yield good results because then the contours of the caves are interrupted.
I have heard of "ear cut" algorithms that can work with concave shapes like my outlines. However those are not compatible with the anchor points I require.
What I'd need is a triangulation algorithm that allows me either to add anchor points inside the figure, or that allows me to limit the maximal length of vertices thus computing anchor points on its own.
Is such an algorithm known?