Simulating the cosmic soup in OpenGL and C

Hi chaps,
I have an assignment which is to do with simulating particles forming in the first seconds, minutes and years after the big bang.

Are there any toolkits that can get me started, I have never done any OpenGL and very little C.

I’m looking for something like this:

Can anyone point me in the right direction??


If you are not familiar with the C language, it is going to be rough. Is it possible to choose another language you are familiar with for this assignment (e.g. VB.Net, C#, Python, anything)?

How to get started: download GLFW and read its manual on how to use it with your compiler. It is very simple to use and has excellent documentation.

Then move forward in small steps like this:

  1. Create an OpenGL window with GLFW.
  2. Render some points with OpenGL.
  3. Make the points move around the screen.
  4. Implement the math for your simulation.
  5. Ramp up the graphics (more points, colors, textures, glow).

Ive done plenty of Java and have used Java3D before, but I’m willing to learn C and OpenGL.

Is GLFW the most popular framework? I’ll be looking for plenty of examples.

Most of the tutorials on the site seem to be “Under Construction”


I don’t know if it’s the most popular, but:

  1. It’s popular enough :slight_smile:
  2. It’s very simple to use.
  3. It’s documentation is top-notch.

The existing tutorials are enough to get you up and running, but they won’t teach you how to use OpenGL (that’s not their target). There are plenty of resources on the Internet, starting from this very site. Check the tutorials and documentation section in the SDK.

FYI, there is also JOGL a java opengl implementation.

Processing allows to do nice visualisations with quite simple code. You can use the Processing helpers or go straight to the GL code :