POV-Ray : Newsgroups : povray.general : Minimum Distance Function : Re: Minimum Distance Function Server Time
8 Aug 2022 22:32:35 EDT (-0400)
  Re: Minimum Distance Function  
From: jceddy
Date: 13 Jul 2022 10:05:00
Message: <web.62ced0416fb4e448864166f75d51d79c@news.povray.org>
> thinking, re "nearest neighbour", perhaps the implementation that comes with the
> GTS library "tools" may be of use?  written by Sunil Arya & David Mount, "ANN:
> Approximate Nearest Neighbours" (though they spell it without the 'u' :-)), I
> have a version from May 2005 installed; sorry, no ref link.

I can compare their kd-tree implementation to the one I have and try to figure
out if I'm dealing with a bug there.

Or rather if it helps me track down the but that is definitely there.

For example, I have a test point:

<-0.35977653631284895, 1.2000000000000000, -0.31591251373961082>

My kd-tree is returning this point as the nearest vertex:

<-0.22430989146232605, 0.65443259477615356, -0.19062881171703339>

The distance from the test point is 0.575926

*BUT*, when I brute force it, I find this is the actual nearest vertex:

<0.34019410610198975, 0.44190537929534912, 0.36512014269828796>

And the distance to that one is only 0.350649

That kind of error can definitely throw everything off.

Post a reply to this message

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