In this video, I demonstrate how to apply Newton’s Law of Universal Gravitation in p5.js using vectors and forces.
Wikipedia entry on Newton's law of universal gravitation
The Nature of Code section on gravitational attraction
Coding Train video on adding an acceleration vector to a Mover object
Coding challenge on attraction and repulsion forces
- Editing
by Mathieu Blanchette
- Animations
by Jason Heglund

