Build a simple Circle-Based Physics Simulation with pi2.js

Fahad Haidari
4 min readJul 8, 2019
World of Circles

Have you ever wanted to quickly build some Circle based Physics with JavaScript, where circles collide and repulse from each other, and experience the gravity that pulls each circle to the ground, or even to the walls?

If so, then I present to you pi2.js: it’s a simple Circle based Physics library which I wrote so I can quickly build JavaScript apps that simulate…