lava lamps using jogl?

Hi,

I would like to write some code that displays lava lamps.

I’ve seen several programs on the web that do so, but the code is not available.

I have no knowledge of OpenGL. I would like to know if there are some people who would like to help me writing some (OSS) code that does that.

Some examples I’ve found on the web (some non java):

Feel free to contact me by email or by replying to this topic.

J

We have a saying in German, “Ein grosses Wort gelassen aussprechen”, roughly translates to “stating a huge concept in a relaxed way” … Well that’s what you’ve done :slight_smile:

As I see it, you have at least two options: Use volumetrics and/or some kind of particle system, or use implicit surfaces. Volumetrics are harder on the coding side while implicit surfaces require more complicated math. And we haven’t yet talked about the fluid physics required in any case.

Bottom line, you are looking at a lot of work for an experienced OpenGL developer with a firm grasp on physics. I could readily imagine correct implementation of such a lava lamp as a masters thesis in cs. Either hire someone if your intentions are commerical, or do a lot of studying to get there (I would recommend starting with basic OpenGL, the NeHe tutorials are great for that).

HTH

Wolfgang

BTW: Something looking like a lava lamp could be easier to implement, especially in Java2D, just some alpha blending. However as you posted your question here I assumed you want to go for “the real thing”.

This is from “Computer Graphics” - Hearn & Baker

After this a mathematic detour occurs and not much is said further except that a substance such as jelly can be simulated by considering the system containing a spring network so as to capture the “wobble”.

I suspect that this would be easier to impliment using a volumetric method rather than a particle one due to the number of particles plus behaviour programming would be vastly more complex and there are many methods for solving the differential equations and such that are generated by the volumetric method. However the mathematics of both methods are beyond my scope as a second year maths student so this is unfamilar teratory.
HTH SNR.

I think that you should take a look at the so called “marching cubes” algorithm, which provides quite a nice solution to implicit surface rendering:

http://astronomy.swin.edu.au/~pbourke/modelling/polygonise/

Don’t give up! :slight_smile:

Cheers

Edit: There seems to be some nice source code and a demo available at Delphi3D (in Delphi), which basically shows you the idea (it’s amazingly simple, after all…):

http://www.delphi3d.net/download/mballs.zip

I liked that “don’t give up” :slight_smile:

Here is another article, nice high-level overview on state-of-the-art, integrating both particle and blob approaches, seems like a good start:

http://cgw.pennnet.com/Articles/article_display.cfm?Section=Articles&ARTICLE_ID=71556&Publication_ID=18

And … I promised a masters thesis, didn’t I? “Rigid, melting and flowing fluids”, submittet August 2004. You’re on a hot topic here.

http://www.cc.gatech.edu/~carlson/papers/carlson-thesis.pdf

Cheers

Wolfgang

Now here comes a real gem …

http://www.paulsprojects.net/opengl/metaballs/metaballs.html

… this guy writes great tutorials, I learned bump-mapping in no time with one of his explanations. Should suite lava-lamping with metaballs :slight_smile: just fine.

Cheers

Wolfgang