Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ypatel2022/gravity-simulation
A gravity simulation using Netwon's Laws of physics.
https://github.com/ypatel2022/gravity-simulation
cpp sfml simulation
Last synced: about 14 hours ago
JSON representation
A gravity simulation using Netwon's Laws of physics.
- Host: GitHub
- URL: https://github.com/ypatel2022/gravity-simulation
- Owner: ypatel2022
- License: mit
- Created: 2023-02-01T19:09:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-04T02:47:02.000Z (over 1 year ago)
- Last Synced: 2024-11-07T13:16:34.303Z (about 14 hours ago)
- Topics: cpp, sfml, simulation
- Language: C++
- Homepage:
- Size: 39.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SFML Gravity Simulation
This is a gravity simulation using Newton's Laws that was created in C++ and rendered using [SFML](https://www.sfml-dev.org/).
![Gravity Simulation](./demo1.png)
![Gravity Simulation](./demo2.png)
![Gravity Simulation](./demo3.png)# Usage
To run the simulation, you can download from the releases page or build from the source code.
When you launch the simulation, you will be presented with a window that is completely still and nothing happens. To start/stop the simulation, press the `Spacebar` key.
If you want to zoom into/out of the simulation, scroll in/out with the mouse wheel. To pan around the simulation, hold down the `Left Mouse Button` and drag the mouse.
To exit the program, press the `Escape` key.
# Edit the simulation
To make edits to the simulation, launch the `SFML Tutorial.sln` solution file and open in Visual Studio 2019. From here open the `SFML Tutorial.cpp` file and start editing 🚀