A simulation of the curse of dimensionality. N dots are spread evenly through a ball of radius 1 in p dimensions, and a small window of radius r around the center is checked for how many dots it holds. A picture shows the two-dimensional case: a disc full of dots with a tiny circle at the center. A table lists p from 1 to 10 with the window's share of the space r to the power p, the expected count N times that share, the count found in this run, and the radius the window would need to hold ten neighbors. A bar chart shows the counts collapsing as p grows. Buttons change r and N and rerun the random draw.

The neighbors vanish

N dots spread evenly through a ball of radius 1. Around the center, a window of radius r. Count what’s inside as the dimension climbs.

r N