What makes a surface minimal
Dip a wire loop of any shape into soap solution and pull it out, and the soap film that spans the loop settles into the surface of least possible area for that boundary. That physical fact defines a minimal surface mathematically: at every point, its mean curvature — the average of how much the surface bends in two perpendicular directions — is exactly zero. A sphere bulges outward the same way in every direction and has large, uniform positive curvature; a minimal surface instead curves upward in one direction exactly as much as it curves downward in the perpendicular direction, like a saddle, so the two effects always cancel.
Triply periodic: tiling all of space
Most minimal surfaces spanning a wire loop are one-off shapes. A triply periodic minimal surface (TPMS) is a special, much rarer kind: it repeats itself in all three spatial directions, tiling infinite space the way a crystal lattice does, while remaining minimal (zero mean curvature) at every point. A TPMS divides all of space into exactly two interpenetrating labyrinths, both connected, both congruent to each other for the most symmetric examples, and neither one touching the other except across the dividing surface itself. Because the surface is smooth and saddle-shaped everywhere, and because each labyrinth threads through space without dead ends, TPMS geometry has an unusually large surface area packed into a compact, repeating unit cell.
The equations: Schwarz P, Diamond, Neovius, Gyroid
The most famous TPMS families are defined by remarkably simple implicit equations: pick a level set (an isovalue) of a trigonometric function of x, y and z, and the resulting surface is minimal, or very close to it, almost by construction.
Schwarz P: cos(x) + cos(y) + cos(z) = t
Diamond: sin(x)sin(y)sin(z) + sin(x)cos(y)cos(z)
+ cos(x)sin(y)cos(z) + cos(x)cos(y)sin(z) = t
Gyroid: sin(x)cos(y) + sin(y)cos(z) + sin(z)cos(x) = t
Neovius: 3(cos x + cos y + cos z) + 4 cos x cos y cos z = t
// t = 0 gives the "balanced" surface; t != 0 shifts and thickens each labyrinth
Schwarz P (1865) and Diamond (1865, both by Hermann Schwarz) each have flat mirror-symmetry planes running through them, visible as straight lines where the surface meets certain cross-sections. The Gyroid, discovered by Alan Schoen in 1970 while working at NASA on lightweight structural materials, is different: it contains no straight lines and no mirror planes at all. Every point on the Gyroid sits on a helical path that twists continuously through space, giving the surface a distinctive, chiral, swirling character that has no flat rest anywhere — its own mirror image cannot be rotated to match the original, exactly as a left hand cannot be rotated to match a right hand.
Rendering it: marching cubes
None of these equations describe a mesh of triangles directly — they define an implicit surface, the set of points where some function equals a constant, exactly like a level set on a contour map but in three dimensions. To draw it, this simulation uses marching cubes: divide space into a fine grid of small cubes, evaluate the implicit function at each of the eight corners of every cube, and wherever some corners are above the isovalue and others below it, the surface must pass through that cube. A lookup table of the 256 possible sign patterns across a cube's eight corners (reducible to 15 unique cases by symmetry) tells the algorithm exactly which triangles to generate, and linear interpolation along each crossed edge places their vertices precisely where the implicit function actually equals the isovalue.
for each cube in the grid:
cornerSign[8] = sign(f(x,y,z) - isovalue) at each of the 8 corners
case = bitmask of the 8 signs // 0..255
triangles = lookupTable[case] // 0 to 4 triangles
for each triangle:
place vertices by linear interpolation along the crossed cube edges
Grid resolution is the main quality knob: a coarse grid produces a visibly faceted, low-polygon approximation, especially in the tightly saddle-curved regions where the true surface bends fastest, while a fine grid recovers a smooth-looking mesh at the cost of many more triangles and a slower marching-cubes pass — the direct reason this simulation exposes resolution as an adjustable parameter rather than fixing it.
Why nature and engineering keep finding it
TPMS geometry solves a problem that shows up again and again wherever something needs a lot of surface area, two separate but interleaved networks, and structural efficiency, all packed into a small volume. The scales on some butterfly wings, including certain Callophrys species, grow a natural Gyroid-structured chitin lattice that produces their iridescent structural colour, entirely without pigment. Some block copolymers self-assemble into Gyroid-like domains as they phase-separate, a property used in filtration membranes and battery electrode research, where the two labyrinths can carry two different phases, like electrolyte and electrode material, with a huge shared interface between them and no dead-end pockets. TPMS lattices have also become a staple of 3D-printed lightweight structures, since the smooth, connected, mathematically defined geometry avoids the stress-concentration points that sharp-cornered lattices suffer from, while still hitting a very high strength-to-weight ratio.
Frequently asked questions
What does it mean for a surface to have zero mean curvature?
At every point, a surface has two principal curvatures, the maximum and minimum bending in perpendicular directions. Mean curvature is their average, and zero mean curvature means the two principal curvatures are equal and opposite at every point, so the surface curves upward in one direction exactly as much as it curves downward in the perpendicular direction, like a saddle. This is the local condition that makes the surface a soap film with no net pressure difference across it.
Why is the Gyroid special compared with Schwarz P or Diamond?
The Gyroid, discovered by Alan Schoen in 1970, contains no straight lines and no planes of mirror symmetry anywhere on its surface, unlike Schwarz P and Diamond which both have flat mirror planes. That chirality means a Gyroid and its mirror image cannot be superimposed by rotation alone, and it is the reason the Gyroid's two interpenetrating labyrinths are especially good at maximising surface area within a compact volume, a property exploited by butterfly wing scales and battery electrode designs alike.
Does marching cubes produce the exact minimal surface?
No, it produces a polygonal approximation. Marching cubes samples the implicit equation on a grid and linearly interpolates where the surface crosses each cell edge, so the true smooth surface is only approached as the grid resolution increases. Coarse grids show visible faceting, especially in tightly curved saddle regions, which is why resolution is one of the main quality knobs in any real-time isosurface renderer.
Try it live
Everything above runs in your browser — open Gyroid & Minimal Surfaces and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Gyroid & Minimal Surfaces simulation