I wrote this code just for fun, and have learnt many things along the way. I plan to include various different forms of physics simulations.
- the multibody.py file runs a simulation of a multibody collision system. There are various ways to interact with the running simulation and I've added instructions as comments (I have hope some other people check it out too just for fun).
Usage:
ESC to quit, P to pause, R to reset, G to toggle gravity, C to toggle Dynamic colors (speed based), I to toggle particle creation. Right arrow key to step one (display)frame ahead when paused.
lastly I plan to add some gifs of the simulations
I added gifs for the simulations! Now this page doesn't look so dull. Also added gif creation controls Gif usage:
press 'Q' to start recording a gif
press 'S' to save the gif. will pause the current simulation display while this proceeds. saves to a file with a unique name in "gifs" folder
Pause and step-by-step movement display. Includes direction of velocity
group of balls can be picked up by holding the mouse and dragging
With the realisation that threading does not work on python due to the GIL, I will move this to a C++ framework, or integrate CUDA programming into this code although I haven't worked with CUDA on python before. But let's see how it turns out.


