Physics-2.0 is a simple 2D n-body gravity simulator made in Python with Pygame. Bodies follow Newton's law of universal gravitation and conservation of momentum. This application can be used to demonstrate simple systems like binary stars, and complex systems like planetary accretion and stellar dynamics. Physics-2.0 can be used in the classroom to help students develop an intuitive understanding of gravitation.
- Improved performance
- Precise physics
- Live simulation settings window
- Adjust gravitational constant
- Adjust time factor
- Fully featured camera movement and zoom
- Window resizing
- Live body telemetry
- Adjust mass and density
- Visualize velocity and acceleration vectors on a logistic plot
- Save simulations to files
- Open simulations from files
Action | Control |
---|---|
Basic camera translation | Arrow keys |
Cinematic camera translation | WASD |
Camera zoom | Scroll wheel |
Open properties dialogue | Left click |
Spawn body | Right click |