STT — Spherical Triangular Tessellation Generator
Constraint-driven adaptive mesh generation on the sphere
STT divides the sphere into triangular cells. Starting from a regular icosahedron, each of its 20 faces is refined as an independent quadtree, so the mesh can be made dense where the physics is detailed and coarse elsewhere. Refinement is steered by points, great-circle lines, polygons, spherical caps and digital elevation data, and the domain can be clipped to an outer outline or cut by interior holes. STT defines how the sphere is cut; the companion fracSTT assigns data values to the resulting cells.
-z): the mesh is subdivided where the elevation field varies rapidly, so the tessellation becomes dense over the continents and coarse over the oceans. Shown in Gmsh for a -d 6/10 run.- ✓Adaptive refinement with a separate depth range per face (
-d<min>/<max>). - ✓Constraints by point, line, polygon, circle and topography, plus outline clipping and hole cutting.
- ✓Selectable reference frame (WGS84, spherical Earth, Moon, custom ellipsoid) and icosahedron orientation.
- ✓Outputs a Gmsh 2.2 ASCII mesh, vertex positions, triangle centres and a neighbour table; optional Python binding (
pystt). - ✓v1.5: silent by default with a one-line summary (
-Vfor progress bars), 1-based numbering, reproducible clipping.
Quick start
# Multi-resolution mesh with line, polygon and circle constraints
./stt -d 3/7 -m example.msh -l doc/control_lines.txt \
-g doc/control_poly.txt -c doc/control_circle.txt
Download
stt_v1.5.zip
v1.5 source tree with CMake files, README, example control files and Python binding demos.
Published work that makes use of this program should cite the following study.
Zhang, Y., Sun, S., Mooney, W. D., & Xu, Y. (2026). Lithospheric magnetization derived from petrological and satellite constraints. Journal of Geophysical Research: Solid Earth, 131(1), e2025JB032111. doi:10.1029/2025JB032111