🔢 Prime Distribution and Gaps
Interactive 3D number-line visualization where scrubbing through increasing ranges of integers highlights primes alongside a live histogram of gap sizes between consecutive primes.
Every integer from 1 up to a chosen limit N is rendered as a cube in a 3D grid or Ulam spiral, with primes lit up in blue while a live histogram on the side tracks the sizes of the gaps between consecutive primes.
🔬 What It Demonstrates
As N grows, primes visibly thin out in line with the Prime Number Theorem, and the gap histogram fills in — showing how small gaps dominate while larger ones become progressively rarer but never disappear.
🎮 How to Use
Drag the Upper limit N slider to scrub through ranges of integers, switch between the wrapped grid and the diagonal-rich Ulam spiral, toggle twin-prime highlighting, or turn on auto-scan to watch the histogram grow on its own.
💡 Did You Know?
Stanisław Ulam discovered his famous spiral in 1963 while doodling during a boring conference talk, noticing primes lining up along diagonals almost by accident.
Interactive 3D number-line visualization where scrubbing through increasing ranges of integers highlights primes alongside a live histogram of gap sizes between consecutive primes.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install