This is a project written in C using the MiniLibX as the API wich simulates Gravity and Colissions using the Burns-Hut algorithm for gravity aproximation and quadtree for collision detection.
The project uses the MiniLibX using the X11 Window system in the Linux Operating System, after the instalation of all dependencies you should do as required:
- Clone the repository;
git clone https://github.com/gecarval/GravitySim.git- Move to the folder;
cd GravitySim- Compile the project;
make- execute the program;
./render [Put Window Width] [Put Window Height]- execution examples:
./render 800 600./render 1600 900./render 1900 1000| BUTTON | ACTION |
|---|---|
T |
Reset Positions |
Y |
Show Quadtree |
U |
Show HashTable |
LMB |
activate/deactivate brush |
Esc |
exit |
[ |
increase speed |
] |
decrease speed |
1 |
on/off Gravity Sim |
Space |
clear screen |