View Full Version : Simulating the cosmic soup in OpenGL and C

03-02-2009, 04:20 AM
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??


Stephen A
03-02-2009, 04:38 AM
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 (http://http://glfw.sourceforge.net/) 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).

03-02-2009, 04:57 AM
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"


Stephen A
03-02-2009, 09:41 AM
I don't know if it's the most popular, but:
1. It's popular enough :)
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. (http://www.opengl.org/resources/) Check the tutorials and documentation section in the SDK.

03-08-2009, 10:46 AM
FYI, there is also JOGL (https://jogl.dev.java.net/) a java opengl implementation.

03-08-2009, 12:32 PM
Processing allows to do nice visualisations with quite simple code. You can use the Processing helpers or go straight to the GL code :