POV-Ray : Newsgroups : povray.binaries.images : unexplained : Re: unexplained Server Time
6 Oct 2024 08:27:10 EDT (-0400)
  Re: unexplained  
From: James Holsenback
Date: 20 Aug 2014 09:26:02
Message: <53f4a1ea$1@news.povray.org>
On 08/20/2014 09:16 AM, clipka wrote:
> Am 20.08.2014 14:29, schrieb James Holsenback:
>
>> I added some debug in OTO_Get_Mask like this:
>>
>> #macro OTO_Get_Mask(Cell)
>>      #local CX = Cell.x;
>>    #local CY = Cell.y;
>>    #local Result = OTO_FMask(CX,CY,0);
>>    #debug concat ("OTO_Get_Mask <",vstr(3,Cell,",",2,4),">
>> Result:",str(Result,2,4),"\n")
>>    OTO_FMask(CX,CY,0)
>>   #end
>>
>> and it produced the following output:
>>
>> OTO_Get_Mask <-8.0000,-5.0000,0.0000> Result:1.0000
>> else: <-8.08857,-4.96521,0.00000>, <-6.81513, -3.69069, 0.00000>
>>
>> OTO_Get_Mask <-7.0000,-5.0000,0.0000> Result:0.0000
>> else: <-6.96521,-4.79876,0.00000>, <-6.19790, -3.81513, 0.00000>
>>
>> OTO_Get_Mask <-6.0000,-5.0000,0.0000> Result:1.0000
>> else: <-5.79876,-4.73380,0.00000>, <-4.90749, -4.19790, 0.00000>
>>
>> OTO_Get_Mask <-5.0000,-5.0000,0.0000> Result:0.0000
>> else: <-4.73380,-4.96589,0.00000>, <-4.33468, -3.90749, 0.00000>
>>
>> OTO_Get_Mask <-4.0000,-5.0000,0.0000> Result:1.0000
>> else: <-3.96589,-5.17163,0.00000>, <-3.41528, -4.33468, 0.00000>
>
> Can you repeat this with a much higher precision for the result? 20
> digits should be enough. I wouldn't be surprised if this was some kind
> of precision issue in the function{pattern{pigment_pattern}} construct,
> as it would perfectly explain why it doesn't compare equal to 1.0. (I
> consider it unlikely that the comparison with 1.0 itself got broken
> somehow, and I think there /is/ a bit of code in the pigment_pattern
> that might be subject to rounding errors.)
>
OTO_Get_Mask 
<-8.00000000000000000000,-5.00000000000000000000,0.0000000000000000
0000> Result:0.99999997764825820923

Hmmm ... OK I think this shows problem the above is output from inside 
the OTO_Get_Mask function ... I now see why reversing the logic (and my 
"on a lark" test) in corner test works


Post a reply to this message

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