Skip to content
ihateDesmos

The gyroid

The gyroid is an endlessly repeating surface that divides space into two intertwined labyrinths. Discovered by Alan Schoen at NASA in 1970, it turns up in butterfly wing scales and in the infill of 3D prints, and it is well approximated by a single trigonometric equation.

A gyroid surface rendered in 3DA gyroid surface rendered in 3D
sin x cos y + sin y cos z + sin z cos x = 0, ray-traced pixel by pixel.

Equations to type

Gyroid (approximation)
sin(x) cos(y) + sin(y) cos(z) + sin(z) cos(x) = 0
Open
A thickened gyroid (a solid lattice)
abs(sin(x) cos(y) + sin(y) cos(z) + sin(z) cos(x)) = 0.4
Open

At a glance

Discovered
Alan Schoen, 1970
Type
Triply periodic minimal surface
Period
2π in each of x, y and z

A minimal surface

A minimal surface has zero mean curvature everywhere: at every point it curves up in one direction exactly as much as it curves down in the other, like a saddle. Soap films spanning a wire frame are minimal surfaces. The gyroid is minimal and repeats in three independent directions, which is what “triply periodic” means. Unlike its relatives, the Schwarz P and D surfaces, it contains no straight lines and no mirror planes.

The equation

The exact gyroid is defined through complex analysis (the Weierstrass representation), but the level surface sin x cos y + sin y cos z + sin z cos x = 0 is an excellent approximation, close enough for engineering and for the eye. Setting the expression equal to a small constant c instead of 0 shifts the surface into one of the two labyrinths; the band |…| ≤ c makes a solid lattice of uniform thickness.

In nature and engineering

  • The scales of some butterflies, such as the green hairstreak, contain gyroid-shaped crystals of chitin that produce colour by structure rather than pigment.
  • Block copolymers and some lipid membranes self-assemble into gyroid phases.
  • 3D printers often use gyroid infill because it is strong in every direction and fast to print.

Why it renders cleanly here

The gyroid is a demanding test for a 3D grapher: it has many thin passages that a coarse mesh can tear or merge. This calculator ray-traces implicit surfaces on the graphics card, finding the surface along each pixel’s line of sight, so the gyroid stays smooth and correctly connected at any zoom.

Frequently asked questions

What is the gyroid equation?
The usual approximation is sin x cos y + sin y cos z + sin z cos x = 0.
What is a triply periodic minimal surface?
A surface with zero mean curvature everywhere that repeats in three independent directions in space.
Why is gyroid infill used in 3D printing?
It is strong in all directions, uses material efficiently and can be printed continuously layer by layer.

More curves

Make it your own

Every equation on this page opens in the calculator, where you can add sliders and watch the curve change.

Open the calculator