POV-Ray : Newsgroups : povray.binaries.animations : Re: Flowing Water take 4 (985KB) : Re: Flowing Water take 4 (985KB) Server Time
20 Jul 2024 07:13:09 EDT (-0400)
  Re: Flowing Water take 4 (985KB)  
From: Rune
Date: 17 Jun 2001 10:29:30
Message: <3b2cbeca@news.povray.org>
"Christoph Hormann" wrote:
> If you always use 'trace' i wonder why the can fall
> through at all, does trace not work correctly?

It's not that simple. With the old model the problem was the following:

When a ray segment detects a surface:

      V
     /
----/-----
   V

The ray is roated so it is parallel to the surface:

<--------<
----------

But with curved surfaces the rotation may cause the ray segment to intersect
with the surface in another point:

 \
<-\------<
   `------

Therefore the collision detection algorith keeps looping untill there's no
collision.

It can also happen that the rotation causes the ray to intersect with a
surface but from the inside and out:

        /
<------/-<


The algorithm ignores that because it will not cause the ray to fall through
the surface.

However, in some cases the rotation causes the ray to intersect a surface at
two points:

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


The algorithm only checks for the first intersection, and if the first
intersection is from the inside and out, it will be ignored, and the
algorithm thinks there's no problem. I then improved the algorithm to check
for the most relevant intersection and it seems to work for the large
majority of cases, but as you can see the whole concept is a bit
complicated, so it's very difficult to make a perfect algorithm...

> I suppose using more and samller particles would be good,
> but that would of course be much slower.

For every animation I have made there have been more and smaller particles,
but it just never seems to be enough...

> That would not be much of a problem, of course it could be
> smaller and easier to program when not implemented in Pov-SDL,
> but i really think that would be very useful.

The problem is that a whole new interface would have to be developed that
would allow the user to "save" and "load" data. It would be more complicated
for the user and much more complicated for me.

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.