POV-Ray : Newsgroups : povray.beta-test : Source 3.7 Beta 31, Linux 64 bits - Bounding optimisation and contained_by sphere : Re: Source 3.7 Beta 31, Linux 64 bits - Bounding optimisation and contained= Server Time
5 Oct 2024 15:44:20 EDT (-0400)
  Re: Source 3.7 Beta 31, Linux 64 bits - Bounding optimisation and contained=  
From: clipka
Date: 12 Mar 2009 01:00:00
Message: <web.49b8952335fd5d61801985dd0@news.povray.org>
Confirmed the error - and found the culprit!

Chris, there is a bug in the IsoSurface::All_Intersections() implementation -
and possibly a misconception about the RefPool:

The IsoSurface::All_intersections() code contains the following:

  /*  METHOD 2   by R. Suzuki */
  tmax = Depth2 = min(Depth2, BOUND_HUGE);
  tmin = Depth1 = min(Depth2, Depth1);
  if((tmax - tmin) < accuracy)
   return (false);

At this point however, an intersection with the container object may already
have been pushed. (I don't know whether the intention here is to discard all
intersection points already found, or just stop searching for additional ones.
In the latter case, IFound should be returned instead.)

The calling function, getting the impression from the return code that there
*are* no intersection points, will in this case not bother evaluating the
intersection stack, and just leave it for deconstruction.

Unfortunately, being managed by a RefPool, the stack is in fact *not*
deconstructed. Instead, the contents are retained until some other code
requests an intersection stack from the pool and is assigned this one.

Obviously, with stale values already in the stack, that other code will compute
crap.


Post a reply to this message

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