PyOpenGL/OpenGL Generating Cosmic NBodys

  • Thread starter Thread starter Tetrisit
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 4K views
Tetrisit
Messages
1
Reaction score
0
I am working on a Universe Simulator. I'm stuck on creating the dark matters webs of the universe that look like this: http://www.mpa-garching.mpg.de/galform/data_vis/sim3dnew-highres.png I am generating the particles as solid spheres with the radius of 0.5 . How can I make the particles slowly move toward each other as demonstrated in the picture above to form "webs" of these particles? If anyone has any ideas or might have some examples of how this can be done that would be great. Code in either c/c++/python would be great. (I have the first step of the picture done) Here is a picture of what I have done: http://i.imgur.com/uiTEa3j.png

The physics I am in need of help with is: Creating a force emitted by each particle to attract other particles toward it to form a web of the particles as show in the picture above.
 
Physics news on Phys.org