SNOW is a custom-built physics engine created using C++ and SDL3, with a focus on an environment to study dynamical systems. It leverages OpenGL for accelerated processing on small scaled simulations. The engine is designed for flexibility and aims to provide an interactive environment for physics simulations.
- Custom Physics Engine: Supports classical mechanics, differential equations, and linear algebra.
- Perspective Camera: The rendering uses an orthogonal camera for the particle system.
- Object-Oriented Design: Designed with extendable classes for objects, cameras, and UI components.
- UI with ImGui: Interactive UI for debugging and visualizing simulation data.
- Shaders: Integrates basic shaders for lighting and rendering (simple shaders with plans for refactoring).
- Simulation Interactions: Tether objects and observe dynamic interactions.
To build and run SNOW, ensure you have the following installed:
- C++ Compiler (GCC/Clang)
- CMake (version 3.15 or higher)
- Gl3w
- Requires Python 3(I don't make the rules)
- OpenGL development libraries:
- On Linux, run:
sudo apt-get install libgl1-mesa-dev
- On Linux, run:
- Git
The necessary external libraries (SDL3 and ImGui) will be automatically fetched through submodules.
- Clone the repository:
git clone [email protected]:Lucaskc36/SNOW.git
- Update Submodules (for external libraries):
git submodule update --init --recursive
- Move to the project directory:
cd SNOW
- Run Gl3W loader
cd external/gl3w python3 gl3w_gen.py cd ../../
- Create a
build
directory:mkdir build cd build
- Build using
cmake
:cmake .. make
- Run the program:
./PhysicsEngine
- After building, run the
PhysicsEngine
executable to start the engine. - The simulation starts with a simple particle system rendered on the screen.
- Modify any configuration files to adjust parameters for custom simulations.
SNOW/
├── build/ # Build directory for compiled files
├── include/ # Header files
├── src/ # Source files
├── external/ # External libraries like SDL3 and ImGui
├── shaders/ # GLSL shader files
├── CMakeLists.txt # CMake configuration
├── README.md # Project documentation
└── LICENSE # License file
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m "Add your feature"
- Push to your branch:
git push origin feature/YourFeature
- Open a pull request.
- Default Collision Detection
- Adjustable time-scales
- Imgui parameterized queue and stack for run-time debugging and
- Integration with other libraries (e.g., Bullet for advanced physics).
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or feedback, reach out to [email protected].
Feel free to adjust this as needed! It includes detailed steps for setup, usage, and contributions, tailored for a project using Doxygen for documentation.