Question: Realistic Animation of Liquids
Hello,
I am trying to implement a 2D version of the system described by Nick Foster and Dimitri Metaxas in the article titled "Realistic Animation of Liquids". My system looks like this: --------------------- | | | | .... --------------------- 1| 2| | | .... --------------------- 2| 2| | | .... --------------------- ... The side labeled 1 represents an inflow so the velocity is fixed, at least for a moment. The boundary are all around the system (the system is a grid, the boundary is the border) so I won't hit it right away and all the other cells are empty (the inflow will fill it in). So when fluids comes in the cell 1 becomes a surface cell. And it's the only cell with fluid inside. As the fluid moves, it goes to another cell. That other cell also becomes a surface cell. In section 3.2.3, they talk about setting conditions for surfaces. My problem is that the computation for a new surface cell doesn't work and the velocity of the cell in which the fluid should now be is null so it stops moving (so in my drawing, the fluid converges on the 2s). 1) I don't understand what he's talking about in 3.2.3. Should I apply (2) then change the velocity of the opened sides? 2) And in section 6, in the summary of his algorithm, he doesn't perform a pressure iteration for surface cell. Why not? The paper is available here: http://www.cis.upenn.edu/~fostern/pdfs/gmip96.pdf. If someone has sample code that implements this system in 2D, it would be very helpful (something that solves his example in figure 4 would be perfect). Thank you, Michel Bastien |
All times are GMT -4. The time now is 21:24. |