New data generating function---For d dimensions, std=2; for D-d dimensions, std=1.