MARTINI stands for Mapbox’s Awesome Right-Triangulated Irregular Networks, Improved.
See the algorithm in action and read more about how it works at ▻https://observablehq.com/@mourner/martin-real-time-rtin-terrain-mesh
To render terrain in #3D, you need a triangular mesh — a set of 3D triangles representing the surface. The easiest way to get one from height data is a uniform grid (two triangles per pixel), but that’s a lot of triangles. For fast rendering, we want to reduce this amount by adapting the mesh to the surface — using bigger triangles in relatively smooth areas, and smaller ones where there’s a lot of detail.