SFML community forums
General => SFML projects => Topic started by: Ceylo on January 20, 2011, 01:37:54 am
-
Helloo!,
I'm posting now to introduce an... old project! I've written it with a friend of mine about 2 years ago in approximatively 2 days. I was, at this time, too lazy too post it here.
But! I've been talking again about it with this friend, thus I thought of showing it here again. And here it is, I hope you'll like it :) .
Don't expect much from it. It's just a simulation of the movements of some particles. You can change the strength of the interactions, invert the polarization or reset the speed of every particle. You can even get some weird shapes depending on your skill :P .
(http://c.sobecki.pagesperso-orange.fr/ceylo/data/gas-screenshot-mini.png) (http://c.sobecki.pagesperso-orange.fr/ceylo/data/gas-screenshot-original.png)
Sources (http://c.sobecki.pagesperso-orange.fr/ceylo/data/gas-src.zip) (1.3 MB)
Binary for Windows (http://c.sobecki.pagesperso-orange.fr/ceylo/data/gas-windows.zip) (2.2 MB)
Binary for Linux (http://c.sobecki.pagesperso-orange.fr/ceylo/data/gas-linux.tar.gz) (1.9 MB)
Binary for Mac OS X (http://c.sobecki.pagesperso-orange.fr/ceylo/data/gas-macosx.zip) (4.9 MB)
Enjoy!
-
Looks pretty good. The source is nice and clean, luckily I can read french :wink:
-
Looks pretty good. The source is nice and clean, luckily I can read french :wink:
Uh yeah indeed I didn't pay attention to the languages I used for the comments, it's a little bit mixed :D
When you say "looks", do you mean you couldn't test it?
-
No, it works. It's pretty good. Just one question:
Why when all the particles are brought together and then their polarity is changed do they expand away from each other in a square shape? If all their repulsion factors are the same, wouldn't they expand in a circular patterns?
-
Indeed they should, this happens because my way of computing the interactions is wrong. But I could get some funny shapes thanks to this mistake, thus I didn't fix it :) .
-
Very nice! Is it written with SFML only?
-
Yup, with SFML only, as you can see in the source files :) .