liveBook · Manning

Triangle quality

As explained in Geometry for Programmers

Triangle quality is the geometric suitability or regularity of a triangle as evaluated by properties such as its angles, side lengths, or aspect ratios.

Triangle quality describes how suitable a triangle is for geometric computation. It is practical rather than completely formalized: mesh-based algorithms generally need triangles that are not too thin or close to degenerate. section 2.2.3 section 2.8

One useful measure compares the incircle radius with the circumcircle radius: Rin/Rout. Equilateral triangles maximize this proportion, while thinner triangles make it smaller. A strictly degenerate triangle has a value of zero. section 2.2.2

Use the metric to make mesh quality decisions:

  • Choose a small-enough threshold and filter triangles whose Rin/Rout falls below it. section 2.2.2
  • Treat quality as an algorithmic requirement: supplying a sufficiently good mesh helps geometric algorithms work reliably. section 2.2.3
  • Remember that no single quality definition is universally established; choose a metric suited to the computation. section 2.6 section 2.8

Filtering a near-degenerate mesh

Suppose a mesh contains both well-proportioned triangles and needle-like or cap-like triangles. Calculate Rin/Rout for each triangle, then remove or repair those below the chosen threshold. The remaining mesh is better suited to later operations such as ray-triangle intersection. section 2.2.2 section 2.2.3

Figure 2.14 The Rin/Rout metric gets smaller as a triangle heads to the degenerate state.
02-14

See how the Rin/Rout value decreases as a triangle approaches degeneracy. section 2.2.2

How Geometry for Programmers covers it

How deep it goes
Defines Rin/Rout and its behavior from equilateral to degenerate triangles, but defers advanced quality-measure surveys.
Examples
Uses equilateral, thin, needle-like, cap-like, and strictly degenerate triangles, plus threshold-based mesh filtering.
What you can do after
Apply it via an Rin/Rout threshold to identify triangles that may undermine mesh-based algorithms.
How it connects
Links triangle meshes, degenerate triangles, incircles, circumcircles, and ray-triangle intersection.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.