Presets
Playback
Tunnel direction
Direction of the drill in the cube frame. Dragging on the shadow changes the same two angles.
Square tunnel
Twist, sideways offset and clearance of the square hole. The green outline means the cube fits.
Layers
Model checks
The science
The question
In 1693 John Wallis recorded a wager attributed to Prince Rupert of the Rhine: can a hole be cut through a cube so large that an identical cube passes through it? Surprisingly the answer is yes, and the hole is not a simple bore through the middle of a face. Here the cube has side 1 (a 10 cm block makes the numbers easy to feel).
1. Reduce a 3D question to a 2D one
Drill straight along a unit direction n. A straight tunnel of square cross-section leaves the cube in one piece exactly when the square lies inside the shadow of the cube projected along n (otherwise the tunnel walls would cut the block in two). The passing cube moves along n with a face square to n, so it passes iff a square of side 1 or more fits inside the shadow polygon. The shadow of a unit cube is the convex hull of the eight projected corners (u·p, v·p), a hexagon in general; its area is A(n) = |nx| + |ny| + |nz| (Cauchy).
2. The largest square in a convex polygon is a small linear programme
For a square of half-side h, centre c and twist ψ (axes e1=(cosψ, sinψ), e2=(−sinψ, cosψ)) and a polygon edge nk·x ≤ bk, the square stays inside iff nk·c + h(|nk·e1| + |nk·e2|) ≤ bk. Maximising h over (cx, cy, h) is a 3-variable LP. The page solves it exactly by enumerating tight triples of constraints, then maximises the side over the twist ψ by golden-section search, and over the direction (θ, φ) with a map plus a pattern search.
3. The two classical answers
Along the body diagonal the shadow is a regular hexagon of side a = √(2/3). The largest square inside it has side a(3 − √3) = 1.03528 (Prince Rupert's own solution). Pieter Nieuwland (1816) found the better value 3√2/4 = 1.06066 with tunnel direction (2, 2, −1)/3: a square with corners (3/4,0,0), (0,3/4,0), (1/4,1,1), (1,1/4,1) on the cube surface. The spare room is about 6 percent of the cube side, so the thinnest wall that remains is only a few millimetres on a 10 cm cube.
4. Wood left
The volume removed is the integral of the chord length of the cube along n over the square window, computed by midpoint quadrature. By Fubini's theorem the same integral over the whole shadow equals the volume of the cube, 1.
Model checks on this page
(1) The body-diagonal search against the closed form a(3 − √3). (2) Nieuwland's explicit surface square (all four sides 3√2/4), the numerical optimum along (2,2,−1)/3 and, after you press Search all directions, the global optimum. (3) For the current view, the hull area against |nx|+|ny|+|nz| and the Fubini integral against 1.
What to try
Choose Face-on: the shadow is exactly the unit square, so nothing can pass. Then Prince Rupert 1688 and Nieuwland 1816, and watch the largest square grow from 1.0353 to 1.0607. Drag Tilt and watch the map: only a small island of directions allows passage. Raise the clearance until the cube is stuck, or push the tunnel sideways until it leaves the shadow and the wall breaks.
Honest simplifications
Perfectly rigid cubes; the tunnel is a straight prism without taper; the passing cube travels along the tunnel axis with its faces square to it (the best way, since a tilted cube has a larger cross-section); the cube is assumed to hover while it is drilled. "Wood left" counts volume only and ignores the weakness of thin walls. Only tunnels with a square cross-section are explored; the cube can also be drilled with other shapes.
What to try
Pick Face-on: the shadow is exactly the unit square, so nothing can pass. Then try Prince Rupert 1688 and Nieuwland 1816 and watch the largest square rise from 1.0353 to 1.0607. Press Search all directions to fill the map: the best island sits near tilt 48 and azimuth 26.6 degrees, which is the same view as (2,2,1)/3 by the symmetry of the cube. Raise the clearance until the red cube gets stuck, or push the tunnel sideways until it leaves the shadow.