Curse of dimensionality with 1D 2D and 3D example