I'm the author of this project. I wrote it because I was very curious about physics simulation, and also because I wanted a reason to study a few libraries that I had never worked with like Qt.
In the readme I tried to explain all the details of how the simulator works. If you don't have time to read it, at least take a look at the GIFs in it. They showcase everything that the simulator can do.
For example, recently I wanted to create a scrolling behavior with boundaries based on properties of the content. In this case, I wanted to draw a column of cards with a bit of tension to overcome before flipping to the next card.
See this diagram: https://imgur.com/a/zVvwtEu
If the viewport was a physical actor in a simulation, gliding along a track that I could generate based on the content, then the left edge of the actor could control the scrollTop or drive the translateY of the content, etc.
Just wanted to share a possible application of your awesome work.
It's funny that you mention this because when I simulated the blocks hitting the words "Dyna-Kinematics" for the title GIF I thought: "This is what graphic designers struggle to do manually. They spend hours animating things so that they look natural."
If graphic designers had access to a physics simulator, they wouldn't have to do anything manually. They could just let the physics do the talking.
I really love that idea, and I think it would sell.
The one gif where you throw a block into a stack reminds of some interesting property of the laws of classical mechanics: they are reversible. That is, the high entropy state after the block hit the stack, if you reverse the momentum of all bodies, will eventually evolve to the low-entropy state consisting of the stack and the block - which would look very improbable (like an egg unbreaking), but possible, nevertheless.
But, because of numerical approximation in computer code, if you actually try to do it (reverse the momentum), you'll notice the simulation won't quite go back to the state it was before.
So, here's a challenge for you: can you come up with a simulation that is deterministically reversible?
FTR, Also Pyslvs-UI may be useful for 2D kinematics analyze and you also could use its core ("pyslvs"; and based on SolveSpace[2] solver) module written in Python.
[0] https://github.com/KmolYuan/Pyslvs-UI
You have a fixed timestep for good reason, which works great if you're displaying by doing interpolation (your display frames lag the physics and are 'catching up' to them), but in some cases where you want low latency in response to player input you might want extrapolation (your display frames are ahead of the physics engine).
I believe people typically do extrapolation by projecting forward any motion in a linear fashion, but it seems this would result in occasional weirdness like geometry intersection. One solution might be to run the physics engine at a fixed timestep for the 'real' changes, but let the graphics engine use the physics engine at a non-fixed timestep to do the extrapolation, where the results of that simulation are not taken into account for the fixed timestep frames.
Is that possible in Dyna-Kinematics, and/or am I talking nonsense? :)