POV-Ray : Newsgroups : povray.general : Minimum Distance Function : Re: Minimum Distance Function Server Time
15 Aug 2022 09:53:25 EDT (-0400)
  Re: Minimum Distance Function  
From: jceddy
Date: 11 Jul 2022 11:25:00
Message: <web.62cc3fec6fb4e448864166f75d51d79c@news.povray.org>
> It's been almost 40 years, so I don't remember why, but I seem to recall
> learning in university that inverse transformations take a heavy toll on
> numeric precision.

Well, based on my tests, this seems to be the case.

When I inverse-transform the test point, do a minimum distance vector to the
original mesh data, then transform that direction vector back to take the
length, the result is slightly off from the version where I keep a parallel
version of the mesh data around that I recalculate by transforming all the
vertices whenever the mesh's Trans changes.

The difference seems small, but the difference in result is stark when you
actually run the ray tracer. The version when I inverse-transform the test
point, then transform the result vector has all kinds of ugly holes. The version
where I carry around a transformed version of the mesh data looks a lot better,
but still has some small artefacts that aren't there using my old ray-sampling
method (although it is quite a bit faster). I think those remaining artefacts
might be due to simple precision issues, and I think I may be able to mitigate
them by introducing a "zero" factor that is a bit larger than zero (like 1e-11
or maybe a bit larger than that even) that I use in the calculation.

Post a reply to this message

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