Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.

Latest commit

 

History

History
11 lines (8 loc) · 1.61 KB

README.md

File metadata and controls

11 lines (8 loc) · 1.61 KB

This code is used to show how Pi can be calculated from elastic collisions between two blocks on a frictionless surface

I discovered his code soon after I made this repo, and after thinking about this problem for so long I realized immediately that his implementation is just amazing. What I appreciate the most is that we both made design decisions that make it easy for new users to play with the simulations in a web-based environment:

  • His is HTML/CSS/JS, so there are literally no extra steps for you to take other than visiting his site.
  • Mine is in pure Python, so I found a way for you to easily run my code using Binder. (just click the index.ipynb file).
  • I also put up a slightly modified version of this as a Kaggle Kernel, you can view the Kaggle Kernel version here.

Lastly, if you're interested in learning about Prajwal Souza's (much cooler) code, I cleaned up and modularized a fork of the repo (still even with master branch as recently as June 27, 2019). The before and after repo just exists so you can see the functionality of the website didn't change at all when I cleaned up the code (i.e. I didn't introduce any bugs). I personally find my updates easier to navigate and understand, but I'll leave it up to you to decide which method you prefer =)

Hope you enjoy!