Click here to Skip to main content
15,306,017 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:

I am trying to simulate the process of how a star is formed by the particle system. I am new to OpenGL so I have no idea where to start. I am currently trying to simulate objects that would be the particles but I don't know how to get it to come together to form a star.

I hav searched the internet for guides on where to start but most article guide using C++... the problem is that i mayb approaching this project on a totally wrong approach but i dont know how else to approach it... I am consulting a mathematician rite now n iwas advise to create one particle and call it in a random function and i have done that but i am not used to opengl so i am having alot of problem with the display... I dont want to waste ur time so am trying to give u the entire overview of whats going on...

How do i get the particle to move towards one direction, as a magnet would attract metals cause its basically a method like that i am thinking i need but i may b wrong....

Can anyone help me please?

Updated 1-Apr-11 6:47am
Henry Minute 1-Apr-11 10:14am
Are you saying that you do not know/understand the principles/math involved in the subject, or that you just do not know how to visualise it using OpenGL?

It would help, if you edited your question to make this clear.
Smithers-Jones 1-Apr-11 12:17pm
Posted by OP as answer:
"i dont understand that math involve... i was told that i hav to use some formula but i dont know where to start. I was thinking to create one particle and then generate it using a random function but that is not working so far...

Hope i have helped in clearing up the question...


I deleted your fake answer. Use "Improve question" to go back and add more information.

A start would be to find out, which formula you should use - "some formula" is a bit vague, don't you think so?

Surely, the place to start is not with the OpenGL implementation, but with the physics?

Get your algorithm for star formation sorted first, using a random cloud of particles (or a defined initial state) and process it until you end up with a star, or something vaguely recognisable as a star. Worry about the presentation when the damn thing works in the first place!
This[^] is the simplest explanation I could find. It is broken down into steps and it contains some named formulae that will at least give you some terms to search on.
As pointed out by our Original, you need to worry first about having a 'reasonable' physical model and then of its presentation.
Random motion might describe a gas, wherein the particles move freely, that is they under no forces (only collisions happen). On the other hand, in order to form an aggregate of particles (like a star is) you need to add the gravitational force.
instal autodesk maya or max and make it easyer instead of programing a particle system.

btw. there are presets for star explosions and star forming. and they have high definision quality for movies ;)
ISBN 1-55860-740-4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900