POV-Ray : Newsgroups : povray.binaries.animations : Re: Flowing Water take 4 (985KB) : Re: Flowing Water take 4 (985KB) Server Time
20 Jul 2024 07:14:40 EDT (-0400)
  Re: Flowing Water take 4 (985KB)  
From: Rune
Date: 17 Jun 2001 13:28:19
Message: <3b2ce8b3@news.povray.org>
"Christoph Hormann" wrote:
> I understand the problem, but it only occurs, if you
> already start below the surface, so i wonder how this
> happens (since originally everything is above and
> there should be no way to get below)

Not exactly correct.

The old algorithm worked like this:

The particle motion is calculated using an OldLocation and a NewLocation for
the particle. The collision detection algorithm traces a ray between these
two points:

\        V  /
 \      /  /
  \    /  /

     /
    V

Then both the OldLocation and the NewLocation are rotated around the
collision point:

\           /
 \         /
  \       /


In order to avoid errors the ray is moved a tiny bit along the normal vector
of the surface:

\           /
 \         /
<-\---o---/-<


The new algorithm works the same way except that if the algorithm loop is
run more than once, then for each loop the ray is traced not from the
OldLocation but from the collision point from the loop before. That works
fairly well, but not perfect.

Perhaps one reason for the occasional errors could be that a ray
accidentally hits exactly between two triangles of the heightfield?

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated May 10)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

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