POV-Ray : Newsgroups : povray.advanced-users : Flowing algorithm? : Re: Flowing algorithm? Server Time
29 Jul 2024 18:27:33 EDT (-0400)
  Re: Flowing algorithm?  
From: Peter Popov
Date: 18 Jun 2001 18:08:35
Message: <7assitkg5o9pqmmh2b28r7reo2fki6ldok@4ax.com>
On Sun, 17 Jun 2001 17:35:33 +0200, "Rune"
<run### [at] mobilixnetdk> wrote:

>Anybody know of a good method to make particles flow along the surface of
>any object where 0.0% of the particles fall through the surface? My own
>algorithm using trace work pretty well in general but there still are a few
>particles escaping here and there...

Let's define the height-field as (default orientation):

y = F(x,z) for x,z in [0; 1]

Then we define a force field like this:


G(x,y,z) = | 0, for y > F(x,z)
           | F(x,z) - y, for y <= F(x,z)

for x,z in [0; 1]

Then you can use this force field to repel the particles. If any
particle happens to fall beneath the surface of the height field, it
will be brought back after an iteration or two.

Hope it works :)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

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