In this repo, I prensent you a tool that can make samples from a random variable given by it's density fuunction. The density function can be whatever you want even thought i has a finite integral il the bounds you give.
I use a tree made recursively by barycentric values of the function. You can see how I do that in main.ipynb
.
The you can make your on gif with any function you want in calculator.py
. You will get a series of pictures containing the histogram plot, and you can create the gif from it online.
Enjoy your reading ;)