After a couple months of tinkering around with SFML and OpenGL here's my finished product!
At first look(
left: default color scheme,
right: random color scheme):
Download and View more on Github:
https://github.com/Syntaf/ParticleSimulatorWhat Exactly Is This Doing?The simulator currently combines mouse input with newtons second law of motion d = (1/2)at
2 + v
it. Particles continually accelerate towards the mouse point while the user holds down LMB. Once released, a constant drag force is applied until the particles eventually grind to a half, making for some pretty near formations in the simulation!
Can I Change Stuff?Of course, just about every variable can be modified during runtime to change the environment the particle live in. The console positioned to the left of the program handles all input and commands so you can create your own custom world and play around with the particles. You are able to manipulate the:
- Drag
- Mass
- MouseForce
- ParticleCount
- Color_r/g/b/a
these commands can be changed at anytime during runtime(except particle count, that is called in the cmd args) by using
get and
set. An example would be:
> get drag
20.0f
> set drag 50
> get drag
50.0f
to see all available commands, make sure to take advantage of the
help <> command
Future Ideas Or SuggestionsI am always open to suggestions on to improve this program. If you have any suggestions, issues or comments leave them here or on the github page, either way works! Better yet, join in, I can never have enough contributors to the project.