|
![](/i/fill.gif) |
On Sun, 17 Jun 2001 17:35:33 +0200, "Rune"
<run### [at] mobilixnet dk> 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] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
![](/i/fill.gif) |