histogram_pdf_2d_sample_test, an Octave code which calls histogram_pdf_2d_sample(), which demonstrates how uniform sampling of a 2D region with respect to some known Probability Density Function (PDF) can be approximated by decomposing the region into rectangles, approximating the PDF by a piecewise constant function, constructing a histogram for the CDF, and then sampling.
The computer code and data files described and made available on this web page are distributed under the MIT license.
histogram_pdf_2d_sample, an Octave code which demonstrates how uniform sampling of a 2D region with respect to some known Probability Density Function (PDF) can be approximated by decomposing the region into rectangles, approximating the PDF by a piecewise constant function, constructing a histogram for the CDF, and then sampling.