POV-Ray : Newsgroups : povray.general : Minimum Distance Function : Re: Minimum Distance Function Server Time
15 Aug 2022 10:08:41 EDT (-0400)
  Re: Minimum Distance Function  
From: jceddy
Date: 13 Jul 2022 11:45:00
Message: <web.62cee8306fb4e448864166f75d51d79c@news.povray.org>
> So my algorithm tests all triangles that use the nearest vertex, and then
> calculates the minimum distance to each triangle, keeping the smallest of those.

Ah, I think I figured out the problem.

Instead of testing the distance to all triangles that share the nearest vertex,
what I *should* be doing is finding a bounding box around the test point based
on the distance to the nearest vertex (probably plus some tolerance), then test
all triangles that overlap that bounding box (which I should be able to use the
bounding box tree to find quickly).

Post a reply to this message

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