Mesh refinement

Mesh refinement is a crucial step in the process of generating high-quality terrain meshes, particularly when working with complex topographies that include contour lines. The goal of refinement is to optimize the mesh by increasing the density of triangles where it is most needed, near the contour lines, while reducing the number of triangles in flatter, less detailed areas. This approach should result in a more efficient mesh, with fewer overall triangles, without compromising the accuracy of the terrain model.

1. CGAL refinement functionalities

The CGAL library provides powerful refinement functionalities that are well-suited for this task. CGAL's mesh refinement algorithms allow for the adaptive refinement of a mesh based on specific criteria, such as the proximity to contour lines or the level of detail required in different regions of the mesh.

  1. Adaptive refinement near contour lines: Using CGAL's refinement algorithms, we can selectively increase the density of triangles in areas close to contour lines. Contour lines represent significant changes in elevation, so capturing these details accurately is essential.

  2. Reducing triangle density in flatter areas: Conversely, in regions where the terrain is relatively flat and uniform, the number of triangles can be reduced without losing significant detail.

Here’s what the refined mesh should look like:


600px
Figure 1. Mesh constrained triangulation to contour lines (source)

600px
Figure 2. Mesh refined (source)


References