POV-Ray : Newsgroups : povray.general : Q: Proximity checking : Re: Q: Proximity checking Server Time
13 Aug 2024 03:21:46 EDT (-0400)
  Re: Q: Proximity checking  
From: Margus Ramst
Date: 20 Nov 1998 08:10:30
Message: <36556A5F.ADF159C6@peak.edu.ee>
You're right, of course. I didn't see the advantage at first. It might have a
drawback, but I'm not sure yet, so I won't discuss this.
The case whether or not a cell contains light sources is already determined with
a simple boolean test; also, I dont't test all 26 adjacent cells, only 13 at the
most (those that have already been processed). The rest are empty anyway.
Btw. I checked out the kd-tree... Not that I'm math-oriented enough to
comprehend the method, but I got the impression that the it is optimal for very
large data sets; I currently have to deal with somewhere around 100-500 points,
so the computational overhead might not be worth it - even if I could implemet
it.

Thanks
Margus

Ron Parker wrote:
> 
> Except that the closest point for a face-adjacent cell will always
> have two coordinates the same as the current intersection point, so
> you don't need to use vlength.  For the other 20 cells you'd have
> to compute a distance anyway, so you might not save anything unless
> one of those cells has more than one or two light sources in it or
> unless the difference on a single axis is already larger than the
> bound.  For example, if you can throw away a face-adjacent cell,
> you can automatically throw away 8 more cells.


Post a reply to this message

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