A pair of jaws
Imagine two parallel lines pressed against opposite sides of a convex polygon, like the jaws of a caliper. Rotating them together while keeping contact lets you read off many geometric quantities cheaply.
The diameter problem
The classic use finds the diameter of a convex polygon, the largest distance between any two of its vertices. The farthest pair must be antipodal, touched by parallel supporting lines.
- Start with calipers on an extreme pair.
- Rotate to the next edge by advancing whichever side has the smaller turning angle.
One linear pass
As the calipers spin a full turn, each vertex is visited a bounded number of times, so the whole sweep is linear in the number of hull vertices, after the hull itself is computed.
A versatile tool
The same rotation answers several questions in one framework.
- The minimum width of the polygon.
- The smallest enclosing rectangle.
- The maximum distance between two convex polygons.
Key idea
Rotating calipers presses two parallel lines on a convex hull and spins them once, visiting antipodal pairs in a single linear pass to extract the diameter, minimum width, and tightest bounding rectangle.