Approximating Pi via casting stones approach in JS with canvas visualization