

On 20220710 15:27 (4), jceddy wrote:
>
> So I got the code to calculated minimum distance using nearestvertex from a
> kdtree working. At least I think so...I have some tiny artefacts that I think
> might be a result of a bug in the code, but might also just be a result of the
> kinds of tolerance issues that were mentioned above.
>
> I added code to the underlying Mesh object in povray for calculating a
> transformed copy of the vertex data, and verified that that seems to be
> working...but now thinking there might be an easier solution. Like...
>
> Can I inversetransform the point being tested, run the minimumdistance
> calculation against the original data to get a minimumdistance *VECTOR* from
> the test point to the original mesh, then just apply the object's transformation
> matrix to that vector before measuring its length?
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.
Post a reply to this message

