liveBook · Manning

Triangle

As explained in Geometry for Programmers

A polygon bounded by three line segments joining three noncollinear vertices.

A triangle is defined by exactly three vertices joined by three edges. Every vertex is a point, but many other points can lie on or inside the triangle; keeping those terms distinct makes geometry code and documentation clearer. section 2.2.1

Applied geometry relies on a few precise distinctions:

  • A point on a triangle belongs to its boundary, while a point in a triangle belongs to its interior; an edge is part of the boundary, not the interior surface. section 2.2.1
  • A degenerate triangle has zero area. A needle has coincident points; a cap has three distinct collinear points. section 2.2.2
  • Degenerate triangles can damage mesh topology, where topology describes which elements touch which. section 2.2.2

Triangles as surface elements

A triangle mesh represents a surface using only triangles and line-segment edges. In a manifold mesh, an edge has at most two adjacent triangles, and a triangle can have up to three neighbors. More triangles can improve approximation accuracy, but increase model size and affect operation performance and reliability. section 2.2.2 section 11.2.3

Figure 2.7 A, B, C, and D are all points but only A, B, and C are called vertices.
02-07

Use the figure to distinguish triangle vertices from the other points contained in or associated with a triangle. section 2.2.1

Figure 2.10 Not all degenerate triangles are the same. Some are needles, and others are caps.
02-10

Use the figure to compare the two principal zero-area forms: needles and caps. section 2.2.2

How Geometry for Programmers covers it

How deep it goes
Defines vertices, points, boundaries, degeneracy, adjacency, and mesh quality, but defers a full treatment of manifolds.
Examples
Uses vertex-and-point diagrams, on-versus-in boundary diagrams, degenerate needles and caps, and neighboring triangles in a mesh.
What you can do after
Evaluate triangle terminology and quality, recognize degenerate cases, and understand their consequences for mesh topology and algorithms.
How it connects
Connects triangles with points, vertices, edges, topology, triangle meshes, manifold meshes, and surface approximation.

Also explained in

Compare how 2 books explain triangle →

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.