nice work!
Have you tried to port it to WASM?
Python can also call the wasm with wasmer
I ported https://github.com/chaosprint/glicol for my Python audio project using the same method
for your physics idea, with wasm, perhaps it can be something like this?