A 3D-particle gravity-simulation using OpenGL's transform-feedback
This simulation creates a 1000000-particle point-cloud and allows the user to set and drag a gravity-source around using the mouse, while the whole simulation volume spins around. It's a nice way to show off the computing power of GPUs these days.
All physics and graphics run on the GPU thanks to OpenGL 3.x transform-feedback feature. It implements Newton's law of universal gravitation. The implemented formula can be found here:
* https:/
It does simplify things a bit as only the interaction of all particles with an optional gravity source are computed. This is not a n-body simulation were all inter-particles forces are calculated too. That does not work with transform-feedback. For this a compute-shader or OpenCL-approach needs to be used. I may implement that later.
Screencast can be seen here:
View full history Series and milestones
trunk series is the current focus of development.