Physics in Processing. Much inspiration taken from https://github.com/RandyGaul/ImpulseEngine .
Read more here: https://www.marginallyclever.com/2021/11/friday-facts-7-a-2d-physics-engine-in-processing-java-and-the-sunk-cost-fallacy/
Processing from http://www.processing.org
Requires ControlP5 library, which can be installed from within the app. Sketch > Import Library > Add Library > seach "ControlP5".
Select different demos from the drop-down list. Press 'g' to toggle gravity. Press 'f' to pause/unpause. Press spacebar while paused to step once.