A project I've created to learn about computer vision and python. I've used real-world equations to model not only gravity, but also other things like the radius of black (here white) holes created. It uses a Barnes-Hut algorithm, that utilizes a quad tree to approximate the gravitational pull exerted on an object in order to improve complexity fom
To control the simulation:
- open your thumb to move left,
- pinky finger to go right,
- index finger to go up,
- middle finger to zoom out,
- have an open palm to zoom in,
- both index and middle finger to move down.
Areas for improvement:
- Add more areas for improvemnt
In the simulation there is a constant dt that determines the amount of small fragments that time will be cut into. To get better (more acurate) results, you can lower the number. It, however, increases the number of calculations made by the computer, prolonging the time of completion.
For the code to work, some dependencies are necessary. To install them, run pip install numpy pygame opencv-python mediapipe . After doing this and downloading the python file, you are ready to go.