POV-Ray : Newsgroups : povray.binaries.animations : Re: Fluid-like simulation (MPEG1) : Re: Fluid-like simulation (MPEG1) Server Time
2 Nov 2024 15:27:04 EDT (-0400)
  Re: Fluid-like simulation (MPEG1)  
From:
Date: 20 Nov 2001 23:53:44
Message: <3bfb3358@news.povray.org>
Hi Dennis!

I know that the real fluid theory is based on the Navier-Stokes equations,
but I think they're really too complicated to be implemented easily in POV.

I'm actually using a trial and error method and trying to see what looks
good. My latest experiment (which I hope I can post later, if it finishes
soon and looks good!!) is based in a gravity simulated environment, in which
there is no interaction between particles. Actually I tried using some
interaction detection routines, but the simulation was WAY TOO SLOW...
especially for a large number of particles.

Then I've implemented a function (which I call "embarrar", which is more or
less like "spread" in Spanish), which gives me the new direction of the
particle when it collides with the surface.
First I used a angle-of-incidence-is-equal-to-the-angle-of-the-reflection
routine, but it bounced too much and it really didn't look like a liquid.
(Even though it looked cool sometimes!)

But now, the new vector of direction depends on the angle of incidence in a
new way: if it is orthogonal to the surface, then it will spread out on the
surface. If it is not orthogonal, then it will be a weighted average between
this random spreading vector and the true reflection vector, weighted by the
angle between the incidence vector and the normal vector of the surface.
I don't know if I'm making myself clear, but remember I'm developing all
this stuff by trial and error, so I really don't have a solid theory backing
my algorithm.

I'm writing my code in Matlab, which exports a textfile with the blob's
coordinates, and then POV reads these textfiles.

Maybe I can show some of my code later, if you still are interested.

Fernando.

ps. Yes, my email is modified so it won't be taken by spam bots. If you see,
YAHOO has 3 o's in the address.


"Dennis Milller" <dhm### [at] mediaonenet> wrote in message
news:3bfb01f6@news.povray.org...
> Hi. I am very interested in your fluid simulations, though I would like to
> try to use something similar in my own abstract animations. Can you tell
me
> a little more
> about how you create and them and perhaps show me some code that I might
try
> to experiment with?
> Thanks very much for your help. By the way, is that your real email, by
> chance? My original email to you.bounced back
> Best,
> Dennis
>
>
>

> news:3bf5514e@news.povray.org...
> > This is the first time I post an animation here. I was amazed by some of
> > your liquid animations and decided to try to make my own.
> >
> > First I tried to drop the "liquid" from above the surface, but I
> encountered
> > many problems, and decided to try first with the liquid already touching
> the
> > surface. Then I gave the particles an initial angular velocity, I think
it
> > looks better.
> >
> > I think it still needs more blobs...
> >
> > Any commentaries are appreciated.
> >
> > Fernando Gonzalez del Cueto.
> > Mexico City.
> >
> > ps. The surface is sometimes known as the mexican hat function :)  f(x)
=
> > cos(x^2 + y^2)
> >
> >
> >
>
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.