POV-Ray : Newsgroups : povray.general : Minimum Distance Function : Re: Minimum Distance Function Server Time
15 Aug 2022 08:43:54 EDT (-0400)
  Re: Minimum Distance Function  
From: jceddy
Date: 13 Jul 2022 09:30:00
Message: <web.62cec87c6fb4e448864166f75d51d79c@news.povray.org>
> Either there is a bug in my kd-tree implementation, or there is something
> fundamentally incorrect with the approach. Will have to do some more testing to
> narrow down which it is.
>

Looks like the kd-tree is not always returning the nearest mesh vertex to the
test point. I create a test that compares the minimum distance found using
simulated annealing vs. the one found using the nearest-vertex test, and then
added some code to find the nearest vertex by using a brute-force check of *all*
the vertices in the mesh, which I run in the case the simulated-distance found a
better solution than the kd-tree nearest-vertex approach.

I fairly quickly ran into a case where kd-tree is not returning the correct
vertex, so now need to figure out why that is the case.


Post a reply to this message

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