GravitySim is a cross-platform C++ application that simulates gravitational interactions between objects. It uses GLFW for window management and OpenGL for rendering.
- Simulates gravitational interactions between objects
- Cross-platform support (Windows, macOS, Linux)
- Uses GLFW for window management
- Uses OpenGL for rendering
- CMake 3.10 or higher
- A C++17 compatible compiler
- GLFW
- OpenGL
-
Clone the repository:
git clone https://github.com/yourusername/GravitySim.git cd GravitySim -
Install dependencies:
- On Debian-based systems (e.g., Ubuntu, Linux Mint), install the required libraries using the following command:
sudo apt update sudo apt install libglfw3 libglfw3-dev
- On Arch-based systems (e.g., Arch Linux, Manjaro), install the required libraries using:
sudo pacman -S glfw-x11 mesa
- On macOS, you can install the dependencies using Homebrew. If you don't have Homebrew installed, you can install it by following the instructions here. Then, run:
brew install glfw
-
Create a build directory and navigate into it:
mkdir build cd build -
Run CMake to generate the build files:
cmake ..
-
Build the project:
On Unix-like systems:
make
On Windows (using Visual Studio):
cmake --build . --config Release
After building the project, you can run the executable:
./GravitySimOn Windows, you can run the executable from the build directory:
GravitySim.exe