POV-Ray : Newsgroups : povray.bugreports : Odd behaviour with sphere_sweep : Re: Odd behaviour with sphere_sweep Server Time
25 Oct 2021 02:26:49 EDT (-0400)
  Re: Odd behaviour with sphere_sweep  
From: William F Pokorny
Date: 26 Apr 2016 09:44:13
Message: <571f70ad$1@news.povray.org>
On 01/10/2016 03:12 PM, clipka wrote:
> Am 10.01.2016 um 18:55 schrieb William F Pokorny:
>> On 01/10/2016 12:35 PM, Le_Forgeron wrote:
>>> Le 10/01/2016 17:19, MidiPlay a écrit :
>>>
>>> There is something strange with cubic spline:
>>> * povray 3.6 binary gives a continuous curve
>>> * povray 3.7 (stable, master, and others...) gives a curve splitted in
>>> the middle.
>>>
>>> Such split does not happen with linear_spline
>>>
>>
>> I see the same, but will add if you gradually move the Y position of the
>> camera 100 -> 500 results gradually look better until at about 500
>> things look OK.
>>
>> Internal bounding issue?
>
> Looks pretty much like that. 3rd-order polynomial (e.g. cubic) splines
> are known to sometimes botch the bounding box computation.
>

I was reminded of this issue the other day and have been doing some more 
investigation.

I spent a lot of time comparing 3.6 to 3.7 code given 3.6 works only to 
find nothing. I finally stumbled across the fact the bounding mechanism 
is always on in 3.7. In other words (-MB<n> / +MB<n>) doesn't function 3.7.

In 3.6 we need 3 shapes (I think) or more for the bounding mechanism to 
trigger and we have 1 so internal bounding is off.

Is this the -MB / +MB mechanism supposed to work in 3.7 ? We changed the 
default threshold in the docs to 25 so guessing yes. I could find no 3.6 
-> 3.7 change notes related to it.

The issue behind is just another issue with the bounding computation as 
you thought Christoph, and it is sitting there in 3.6 too - if we turn 
bounding on with +MB1.

Basically the current mechanism multiplies the radius of each sphere by 
2 and in this case here where the radius is small, but the range is a 
couple orders of magnitude larger, that 2x just isn't enough. This even 
though the curve is a pretty gentle cubic as curves go.

The multiplier should probably fudge upward from 2 by default if the 
range for the curve is large compared to the radius. Another more 
general option would be to add a new keyword to the sphere_sweep which 
lets the user optionally control the bounding radius multiplier?

Bill P.


Post a reply to this message

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