Why it matters

Rotating calipers solves many convex problems. Understanding shapes geometric technique.

Advertisement

The architecture

Two parallel lines rotate around convex polygon.

Extract features per rotation.

Rotating calipersConvex polygoninputRotate calipersparallel linesExtract featuresdiameter / width / etc.Shamos 1978; O(n) for many convex polygon queries after O(n log n) hull
Rotating calipers.
Advertisement

How it works end to end

Applications: diameter, width, closest / farthest pair.

Antipodal vertices.

O(n) after convex hull.