Randomly fill a 3D grid according to a probability density function p(x,y,z)
问题 How can I fill a 3D grid in the order specified by a given probability density function? Using python, I'd like to lay down points in a random order, but according to some specified probability distribution over that region, with no repeated points. Sequentially: create a discrete 3D grid specify a probability density function for every grid point, pdf(x,y,z) lay down a point (x0,y0,z0) whose random location is proportional to the pdf(x,y,z) continue adding points (without repeating) until