What happens when two circles collide in a p5.js canvas? In this video, I examine the math and implement idealized elastic collisions in a JavaScript physics simulation. This video supplements the Nature of Code book series in Chapter 6 which uses 3rd party physics libraries to ...
The Nature of Code book (2024 p5.js edition)
The Nature of Code book (2024 p5.js edition) is now available for pre-order!
Wikipedia article discussing elastic collisions.
Introduction to solving collisions without complicated trigonometry.
Explanation and derivation for formula of elastic collisions, by Dipam Sen.
- Editing
by Mathieu Blanchette
- Animations
by Jason Heglund