POV-Ray : Newsgroups : povray.general : Minimum Distance Function : Re: Minimum Distance Function Server Time
8 Aug 2022 21:35:00 EDT (-0400)
  Re: Minimum Distance Function  
From: jceddy
Date: 13 Jul 2022 18:35:00
Message: <web.62cf48056fb4e448864166f75d51d79c@news.povray.org>
> Oh, I also want to tinker around with doing an inverse translation on the sample
> point and then translating the result vector back to measure it...I think it
> might work the way I want now that I am not sampling the wrong set of triangles,
> and if I can get it to work properly will allow me to remove a bunch of code I
> added to Mesh to generate transformed versions of the vertex data and bounding
> box tree.

I got the inverse-transform stuff to work correctly.

Cleaned up the code, removed all the simulated annealing stuff I had added,
changed "minimum_distance" to "proximity", implemented the Proximity() virtual
function in ObjectBase (which throws an error if it's called for objects that
don't have it implemented), implemented the Proximity() override for Mesh,
cleaned up pattern parser code for "proximity" pattern, and changed it to call

Proximity returns negated values for points inside the object.

The proximity pattern does not attempt to scale or clamp values, so it will look
like the values are just 0.0-1.0 repeating to the user...it is up to them to do
any required scaling that makes sense. This is something that we might want to
give some options for eventually, but it's outside the scope of what I am doing

Updated my fork on github with all of the changes.

Next step (after some more testing) will be to implement Proximity() for other
object types.

Post a reply to this message

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