/pi-calculation-with-collision

This program uses pygame to stimulate two masses colliding in a frictionless enclosed environment. The number of collisions in this system turns out to be PI.

Primary LanguagePythonMIT LicenseMIT

PI calculation with collision

This program uses pygame to stimulate two masses colliding in a frictionless enclosed environment. Due to some PHYSICS stuff, the number of collisions turns out to be pi!

References

This program was inspired by 3Blue1Brown's video

Here is another video by 3BlueBrown explaining why this phenomenon takes place.

Helpful Wikipedia pages:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Demo

collisions_demo