2DPhysics is a real-time physics simulation engine built with C++ and OpenGL for gravitational and electric field simulations. Features include accurate gravitational and electric force calculations, real-time collision detection, and an interactive ImGui interface. Users can create circles with customizable mass, radius, and charge properties, then observe interactions with configurable fields. Supports drag-and-drop manipulation, adjustable time scale, and velocity visualization. Built on a custom cPhysics library implementing Newtonian mechanics with proper numerical integration. Uses C++23, CMake, GLFW, GLEW, and ImGui. Objects can be fixed or movable, enabling orbital mechanics demonstrations and charged particle experiments. Includes preset charge values, field direction controls, and vertical sync options. Suitable for educational purposes and physics experimentation.
Features
- Real-time Physics Simulation
- Gravitational & Electric Fields
- Interactive Object Manipulation
- Collision Detection
- ImGui Interface