Ok I'm trying to learn fluid simulation and the best I could find was using the navier stokes equations for fluid simulation in gaming. A very in depth article about this was created by Jos Stam. The article can be found here...
http://www.google.com/url?sa=t&sour...zmEwYFIfPM0YiawOg&sig2=fd7eqYopsDBl28cphoIxUQ
Along with this article (on Jos Stam's website) I found a link to a full C project written in openGL and GLUT creating this fluid simulation. You can download it yourself from his website if you want. I went ahead and packaged it in an xcode project already and you can see it here...
http://www.nitrexpro.com/GLUT_Fluid_Example.zip
Just build and go to run. To add density you right click and hold and then click with left mouse button to apply forces. You can also hit "V" to see a line version of the velocity.
Anyway I'm trying to port this to iPhone which does not have GLUT and i am having some trouble. I know it can be done and a video using this exact code ported to iPhone can be seen here...
http://www.vimeo.com/2963541
Therefore i know it can be done but i cannot figure out the transition. If any of you are up for the challenge and have some spare time can you try to make the changes in code so it will run on iPhone. I dont need the velocity view with the lines and stuff, just the stuff with adding density and pushing it around (you will see). If not can you perhaps give me some pointers on what needs to be changed and where to look or start. This forum has been super helpful so hopefully someone can solve this problem too. Thanks a ton!
Nick
http://www.google.com/url?sa=t&sour...zmEwYFIfPM0YiawOg&sig2=fd7eqYopsDBl28cphoIxUQ
Along with this article (on Jos Stam's website) I found a link to a full C project written in openGL and GLUT creating this fluid simulation. You can download it yourself from his website if you want. I went ahead and packaged it in an xcode project already and you can see it here...
http://www.nitrexpro.com/GLUT_Fluid_Example.zip
Just build and go to run. To add density you right click and hold and then click with left mouse button to apply forces. You can also hit "V" to see a line version of the velocity.
Anyway I'm trying to port this to iPhone which does not have GLUT and i am having some trouble. I know it can be done and a video using this exact code ported to iPhone can be seen here...
http://www.vimeo.com/2963541
Therefore i know it can be done but i cannot figure out the transition. If any of you are up for the challenge and have some spare time can you try to make the changes in code so it will run on iPhone. I dont need the velocity view with the lines and stuff, just the stuff with adding density and pushing it around (you will see). If not can you perhaps give me some pointers on what needs to be changed and where to look or start. This forum has been super helpful so hopefully someone can solve this problem too. Thanks a ton!
Nick