I am looking to be able to generate a random uniform sample of particle locations that fall within a spherical volume.
The image below (courtesy of http://nojhan.fre
Normed gaussian 3d vector is uniformly distributed on sphere, see http://mathworld.wolfram.com/SpherePointPicking.html
For example:
N = 1000 v = numpy.random.uniform(size=(3,N)) vn = v / numpy.sqrt(numpy.sum(v**2, 0))