https://github.com/1180779/unrealistic-gravity-box
https://github.com/1180779/unrealistic-gravity-box
cpp cuda opengl
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/1180779/unrealistic-gravity-box
- Owner: 1180779
- Created: 2024-11-28T20:17:08.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-01T16:45:41.000Z (over 1 year ago)
- Last Synced: 2025-03-01T17:34:03.985Z (over 1 year ago)
- Topics: cpp, cuda, opengl
- Language: C++
- Homepage:
- Size: 1.78 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unrealistic gravity box
A simple cuda openGL interop project simulating an unrealistic gravity box.
## Why unrealistic?
Energy is never lost in the simulation. All collisions are treated as perfect elastic collisions.
Energy loss is easy to add and can be done by few manipulations in the code base.
## Settings
Project supports a few user provided settings:
- number of particles
- maximum starting veclocity in x and y axis (in some arbitrary units - check code for details)
- acceleration `g`
- particles radius
Some of the notable limitations include:
- all particles have the same radius
The settings can be loaded from file located in the same directory as the executable.
Example [configuration](./Cuda_OpenGL_GLFW_glad_test/config.txt) is provided.
## Examples
Check [samples](./samples) directory for the following examples (.mp4)
- 15 big particles


- 100 000 small particles (chaos)


## FAQ
**Q: Why is the project folder named "Cuda_OpenGL_GLFW_glad_test"?**
**A:** It was a working name in early testing. Due to Visual Studio having issues with folder renaming I have not changed it.
**Q: It seems like the particles are accelerating?**
**A:** It does seem like this is the case. I have no idea why thought. Feel free to investigate if you feel like it.