POV-Ray : Newsgroups : povray.binaries.images : Old media blob issue leading to a look at sturm / polysolve. : Old media blob issue leading to a look at sturm / polysolve. Server Time
24 Apr 2024 21:59:02 EDT (-0400)
  Old media blob issue leading to a look at sturm / polysolve.  
From: William F Pokorny
Date: 30 Mar 2018 08:21:48
Message: <5abe2bdc$1@news.povray.org>
In continuing to look at media I returned to a 'blob-media' issue Gail 
Shaw originally posted back in 2005. The bright spots at the very edge 
are indeed caused by the 'intersection depth < small_tolerance' or 
missed intersection issue as Slime guessed at the time.

However, the sturm result Gail showed never made any sense unless sturm 
is broken for blobs. Gail's original belief something changed 3.5 to 3.6 
was correct. Optimizations were done involving bounding and polynomial 
reformulation for 3.6 which occasionally inhibit 4th to 3rd order 
reduction(1). The bright spots not on the edge happen where 
Solve_Polynomial passes the original 4th order blob equation to 
polysolve and we get bad roots back.

(1) - Happens mostly with transparency.

In the lower left in the attached image I hacked the code to prevent 
order reduction with blobs. Surprised to find it looks like blobs only 
work as formulated due order reduction - even in v3.5.

All got me digging again into the solver code. Since v1.0 there has been 
a regula_falsa function called once the rule of signs stuff has 
determined a sub-interval contains a single root. The regula_falsa is 
buggy once polynomial order is >= 4 given how many of our polynomials 
are formulated - the evaluated values can be very small.

I've coded up a branch modifying the regula_falsa function so it sanity 
checks the root found is a real root - within some tolerance - otherwise 
it invalidates the root and tosses control back to the interval 
bisection code.

Branch fixes this blob issue, the lathe issue #335 from last fall and 
many remaining #147 (sphere_sweep) solver issues - except one b_spline / 
orthogonal camera case. The patch also fixes or makes better many of the 
accuracy issues I have in hand, however, I have too still some scenes 
with 'accuracy' issues to dig through. The work is tedious and I need a 
break - so putting out the fix I have.

A branch of master with the code update is available at:

https://github.com/wfpokorny/povray/tree/fix/polynomialsolverAccuracy

for those compiling their own POV-Ray versions. I plan to create a pull 
request once I've looked at some of the remaining accuracy issues.

Aside: The regula_falsa function isn't strictly needed for root finding, 
but the solver runs faster with it than not.

Bill P.


Post a reply to this message


Attachments:
Download 'blobsturmbroken.jpg' (129 KB)

Preview of image 'blobsturmbroken.jpg'
blobsturmbroken.jpg


 

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