Inspired by @3blue1brown Hypersphere Geometry Curse of Dimensionality

Puny Hyperspheres: High-Dimensional Ball Geometry Lab

In 2D and 3D space, spheres comfortably occupy a large portion of their bounding box (78.5% and 52.4%). But as dimension n climbs, hyperspheres become infinitesimally puny: their volume collapses to 0, over 99.9% of their mass migrates into an ultra-thin outer crust, and hypercubes mutate into spiky pin-cushions whose corners extend out to R√n.

Explore Presets:
Hypersphere Volume Vₙ(1) & Inscribed Ratio Collapse
Notice how the volume of a unit ball climbs up to n = 5 (V₅ ≈ 5.2638), then plummets exponentially toward zero as n → ∞.
Current: Dimension n = 5 | Ball Volume: 5.2638 | Ratio to Cube: 16.449% Formula: Vₙ = π^(n/2) / Γ(n/2 + 1)
Concentration of Measure (Orange Peel)
Radial density dV/dr ∝ rⁿ⁻¹. The outer crust [R(1-ε), R] swallows all mass.
At n = 5, a thin shell of thickness 5% holds 22.62% of the total volume. In 50D, that same shell holds 92.3%!
Monte Carlo Point Acceptance
Random points in [-1, 1]ⁿ projected onto (x₁, x₂) axes. Green = Hits (||x|| ≤ 1).
Empirical Acceptance: 16.45% (3,290 / 20,000) Theoretical: 16.45%
Deterministic Validation Telemetry (Representative State Verified)
Active Dimension (n): 5
Exact Hypersphere Volume Vₙ: 5.263789
Surface Area Sₙ₋₁: 26.318945
Hypercube Volume (2R)ⁿ: 32
Inscribed Ball Volume Ratio (%): 16.4493%
Hypercube Corner Diagonal Reach (R√n): 2.236068
Crust Mass Percentage (ε=0.05): 22.62%
Monte Carlo Estimated Hits: 3290
Simulation Engine: Closed-form Gamma + Uniform Random Vector Generator
Why Do Balls Peak at n = 5?
The volume formula is Vₙ = π^(n/2) / Γ(n/2 + 1). The numerator grows exponentially as π^(n/2), but the denominator grows super-exponentially through the Gamma factorial function Γ(n/2 + 1) ≈ (n / 2e)^(n/2). Initially, π ≈ 3.14159 dominates, driving volume to its maximum at n = 5 (V₅ ≈ 5.2638). Beyond n = 5, factorial decay overwhelms π, causing volume to crash toward zero. By n = 30, the unit ball volume is 0.000022!
The "Orange Peel" Theorem
The volume of an n-ball of radius r scales as rⁿ. The ratio of the core of radius R(1 - ε) to the full ball of radius R is (1 - ε)ⁿ. As n increases, this fraction approaches e^(-nε) → 0. Therefore, virtually 100% of the hypersphere's mass is concentrated in an infinitely thin skin of width roughly 1/n on the boundary! If you peel a high-dimensional orange, almost nothing remains inside.
Why Hypercubes Are Mostly Corners
A hypercube [-1, 1]ⁿ has 2ⁿ vertices, each located at distance √(1² + 1² + ... + 1²) = √n from the center. In 100 dimensions, every corner is 10 times farther from the origin than the center of each face! The inscribed unit ball touches the 2n faces at distance 1, while the corners jut out into the void like ultra-sharp needles. The volume of the inscribed ball relative to the cube is Vₙ / 2ⁿ, dropping from 78.5% (2D) to 0.00000000000000000000000001% in 50D.