We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › liquid simulation
Page Index Toggle Pages: 1
liquid simulation (Read 836 times)
liquid simulation
Jun 14th, 2008, 12:28pm
 
hello, i need to make some liquid simulation, like water, for a interactive piece. Do anybody have tried something like this? maybe theres a library or are there any code to share?
if not, which should be the approachs for simulating liquids, i was thinking using cellular automata...

any hint?

thanks

punchik
Re: liquid simulation
Reply #1 - Jun 14th, 2008, 2:00pm
 
Unless making a full hydrodynamic model, it might be hard to answer your question...
Do you need a 3D simulation, just a 2D one?
Do you need to show liquid falling, dripping, streaming along an incline, flowing on a surface (eg. a maze...)?

In any case, perhaps particle simulation could do the job. I would look toward traer.physics, it might be usable for that.
Re: liquid simulation
Reply #2 - Jun 14th, 2008, 5:44pm
 
Learning > Topics > Simulate > Fluid
http://processing.org/learning/topics/fluid.html
Re: liquid simulation
Reply #3 - Jun 15th, 2008, 2:30pm
 
Hi Punchik, you can go for a particle based approach like the link antiplastik sent, or you can go for a cell based approach. I went down the latter route and followed the instructions here http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf

with additional help from here
http://www.mikeash.com/?page=pyblog/fluid-simulation-for-dummies.html
(though the latter solves it in 3D which was unnecessary for my needs).
My results are here
http://www.memo.tv/psychedelic_fluids_and_particles_with_processing

I wanted to release the code for the fluid system, but I want to clean it up first and haven't had a chance yet! But i'm sure those links will be quite helpful...
Page Index Toggle Pages: 1