Search code examples
c++copenscenegraphtessellation

Near-uniform tessellation of a concave polygon for heightmaps


I am given the contour/boundary of a concave polygon which cannot have holes, and I need to apply a heightmap to it. To this end, I need to perform a near-uniform tessellation of the polygon like so:

.

How can I perform this tessellation? Ideally, the solution could parameterize the 'resolution' of the internal vertices to adjust the detail of the tessellation.

I'm using OpenSceneGraph, so if this is somehow possible using its built-in tessellation library that would be ideal, but I'm open to introducing an additional (hopefully lightweight) dependency if necessary.


Solution

  • This question didn't attract a great deal of interest, but I achieved fairly good results using the difficult-to-Google Triangle library.

    A quick preview of some results.

    If I decided I wanted the triangulation to be strictly uniform on the interior of the polygon, I could probably provide Triangle with a set of vertices to further constrain the tessellation.