https://zonebahama.blogspot.com/2018/05/ball-in-wedge-javascript-simulation.html