loading...
Projected gap between the two corner cubes against the angle off the magic axis (grey: orthographic formula)
Gap in beam widths over time (watch it while you orbit; green line: seam you cannot see)
Magic viewpoint, then Turntable: the triangle opens and closes twice per turn. Wide-angle lens: still closed if the camera is exactly on the line. Sideways shift: the perspective gap grows linearly with the shift.
running...
The science
What the object really is. The Penrose triangle is not an impossible object, only an impossible picture of a perfectly possible one. Build a staircase of three square beams: beam A runs along +x from corner cube c0 to c1, beam B runs along -z from c1 to c2, beam C runs along +y from c2 to c3. The far end c0 is at the origin and the near end c3 is at (L, L, -L), so the hidden gap is
G = c3 - c0 = (L, L, -L), |G| = sqrt(3) L
Why it closes. Under a parallel (orthographic) projection along a unit direction u, the image of a point is p - (p . u) u. For the two cubes the separation is
gap(theta) = |G - (G . u) u| = |G| sin(theta)
where theta is the angle between u and G. At u = G/|G|, the direction (1, 1, -1)/sqrt(3) (azimuth 135 deg, elevation 35.26 deg), the gap is exactly zero: the near cube c3 hides the far cube c0, and beams A and C appear to meet. The three beams are painted so that every corner looks like a convex corner of a cube, so the eye reads a closed triangle.
Perspective. A real camera is a pinhole, not an orthographic projection. For a pinhole at distance a along the line through c0 and c3, both cubes lie on a single ray, so they still coincide: the illusion works with any lens if the camera sits on that line. If the camera is displaced sideways by e, a point at axial distance a appears at angle e / a, and the two cubes separate in the picture by
gap = D e |1 / a3 - 1 / a0|, a0 = D + |G|/2, a3 = D - |G|/2
(measured in the plane through the centre at distance D). A long lens (small field of view, large distance) makes a0 and a3 nearly equal, so the illusion tolerates more sideways error.
Honest simplifications. The beams are exact square sections drawn as flat shaded boxes (2D) or lit PBR meshes (3D); the "impossible" look depends on the unshaded joint being unnoticeable, so in the 3D version the real depth cues (stereo, shadows, motion parallax, occlusion by the beam you move past) break the illusion as soon as you move. The gap threshold used in the verdict (a fraction of the beam width) is a visual rule of thumb, not a measured perceptual limit.
Checks run in the page. The orthographic gap is zero along (1,1,-1); the orthographic gap at three tilt angles equals |G| sin(theta) to 1e-9; the pinhole gap with a camera 0.6 units off the line equals the formula above; with a 60 degree lens exactly on the line the gap is still zero; the camera projection matches the raw pinhole formula (and, in 3D, the Three.js camera.project result).