https://zonebahama.blogspot.com/2018/05/riemann-integral-javascript-simulation.html