Differential Geometry of Surfaces — Gaussian Curvature Explained
Why a flat pizza slice curls when you fold it, why every world map lies about something, and how a single number — Gaussian curvature — governs mesh shading, UV unwrapping and shell structures.
1. From Curves to Surfaces: Principal Curvatures
For a plane curve, curvature is a single number at each point: how fast the tangent direction rotates as you move along the curve. For a surface in 3D, curvature is more subtle, because a surface can bend differently depending on which direction you travel across it. Stand at a point on a saddle-shaped Pringle chip: walking along the "long" axis, the surface curves downward; walking along the "short" axis, it curves upward. A single curvature number cannot capture that.
The fix, due to Leonhard Euler, is to slice the surface with planes containing the surface normal at a point, producing a curve in each direction, and measure that curve's curvature. As the slicing direction rotates through 360°, the curvature value oscillates between a maximum and a minimum. These two extreme values are the principal curvatures k₁ and k₂, and the directions in which they occur are always perpendicular to each other — the principal directions.
This pair of numbers (k₁, k₂) at every point of a surface is the raw material of differential geometry — from it, every other local curvature quantity is built.
2. Gaussian and Mean Curvature
Carl Friedrich Gauss combined the two principal curvatures into a single scalar, the Gaussian curvature K, defined simply as their product. A second, independent combination — their average — gives the mean curvature H:
The sign of K classifies the local shape of any smooth surface into exactly three types:
K > 0 (Elliptic)
Dome-like. Both principal curvatures have the same sign — the surface curves away from its tangent plane on all sides, like a sphere or an egg.
K = 0 (Parabolic)
Developable. At least one principal curvature is zero — cylinders, cones, and planes can be unrolled flat with no stretching.
K < 0 (Hyperbolic)
Saddle-shaped. Principal curvatures have opposite signs — think potato chips, saddles, and the surfaces of certain minimal shell structures.
Mean curvature H, by contrast, governs minimal surfaces — soap films famously minimize surface area subject to a fixed boundary, and the Euler–Lagrange condition for that minimization is exactly H = 0 everywhere. This is why soap films between wireframes form smooth, saddle-like shapes: they are physically solving a mean-curvature-flow equation in real time.
// Discrete Gaussian curvature at a mesh vertex via angle defect (Gauss-Bonnet)
function angleDefectCurvature(vertex, oneRingTriangles) {
let angleSum = 0;
for (const tri of oneRingTriangles) {
angleSum += interiorAngleAtVertex(tri, vertex);
}
// A flat neighborhood sums to exactly 2π; any shortfall is curvature
const areaMixed = voronoiAreaAroundVertex(vertex, oneRingTriangles);
return (2 * Math.PI - angleSum) / areaMixed; // discrete K
}
3. The Theorema Egregium: Curvature Is Intrinsic
In 1827 Gauss proved a result he considered so surprising he named it the Theorema Egregium — Latin for "remarkable theorem." It states that Gaussian curvature K, despite being defined using the surface's embedding in 3D space (via the normal vector and how it tips over as you move), is actually computable purely from measurements within the surface itself — distances and angles measured by a hypothetical 2D creature living on the surface, with no knowledge of any surrounding 3D space.
The consequence is enormous: Gaussian curvature is an isometric invariant. If you bend a surface without stretching, tearing, or compressing it — rolling a flat sheet of paper into a cylinder, for instance — Gaussian curvature at every point stays exactly the same. A flat sheet has K = 0 everywhere; roll it into a cylinder or a cone and K is still 0 everywhere, because rolling paper doesn't stretch it. But a sphere has K = 1/R² > 0 everywhere, and no amount of bending can ever turn a flat sheet of paper into part of a sphere without stretching or tearing it, because bending alone cannot change K.
The same theorem explains why UV unwrapping a curved 3D character model for texturing always requires cutting seams and introduces some stretching: any patch of the mesh with nonzero Gaussian curvature (a nose, a knee, a sphere-like head) cannot be flattened isometrically onto a 2D texture plane. UV unwrapping algorithms work by minimizing this unavoidable distortion, placing seams strategically where the curvature (and hence the stretching) is worst, or where seams will be least visible.
4. Curvature in Graphics and Engineering
Shading and rendering. Curvature-aware shaders use principal curvature directions to orient anisotropic highlights (brushed metal, hair, fabric) correctly along the surface's natural grain. Mean-curvature-based ambient occlusion approximations darken concave (high positive mean curvature) creases and crevices without any expensive ray tracing.
Mesh smoothing and fairing. Mean curvature flow — moving each mesh vertex in the direction of its local mean curvature normal — is a standard geometry-processing operation for smoothing noisy scanned meshes while preserving overall shape, since it is exactly the discretized version of the equation soap films obey.
Shell and architectural structures. Engineers exploit K < 0 (hyperbolic, saddle-shaped) surfaces for thin concrete shell roofs because such anticlastic surfaces are structurally rigid without heavy internal framing — famous examples include hyperbolic paraboloid roofs by Félix Candela and the saddle-shaped structures of Sydney's and other cities' stadium canopies. Developable (K=0) surfaces, meanwhile, are prized in sheet-metal and shipbuilding because they can be manufactured by bending flat stock with no stretching.
Physically-based deformation. Cloth and thin-shell simulation in games and film relies on bending energy terms derived directly from mean curvature, since resisting a change in curvature (rather than a change in stretch) is exactly what makes cloth feel stiff or flowing.
Explore Math Simulations
Visualize surfaces, curvature and geometric structures interactively in your browser.