The isoperimetric coin puzzle 🪙
A loop of string with the same perimeter lets a rigid coin slip through when it's a circle, yet jams it when it's a square. Drag the perimeter, the coin and the shape to see why: the circle maximizes the inscribed diameter (P/π). Pure canvas + JavaScript, no libraries.
// classic isoperimetric geometry · my own implementation
geometry
inscribed diameter
—
coin diameter
—
clearance
—
enclosed area
—
same P: square vs circle
square
—
circle
—
—
💡 the isoperimetric principle in 3 lines
- Among all closed shapes with a fixed perimeter P, the circle is the one that encloses the largest area.
- The circle also maximizes the minimum width of the opening: its inscribed diameter,
P / π.
- That's why a rigid coin that jams in a square loop slides right through once that same string is opened into a circle.