We wrote a preliminary implementation using the python language and specialized
to the topological simplification of terrains. The terrain is a triangulated 2D
grid whose simplices are assigned a height value in [0, 1]. The terrain is
made manifold by gluing dummy triangles from the boundary of the terrain to a
dummy vertex. The dummy simplices are assigned height greater that one. In
practice, this is not ideal, as the many dummy triangles and edges tend to
interfere with the pairing of the actual terrain’s simplices; it would be
preferable to use a single dummy 2-dimensional face whose boundary spans the
whole terrain boundary edges.
The left image is the initial terrain.
The middle image is simplified with epsilon = 0.2.
The right image is fully simplified.
Note: When simplifying a subtree of the spanning tree, we did not redistribute
the height values evenly among the subtree's vertices. This results in the many
small flats around each vertex. They appear when the barycentric subdivision is
computed.
The name of the game is to spot the new (reddish) ridges and (blueish) valleys
that appear when the simplification threshold is raised. Many of them are difficult
to see. Can you spot them all ?