POV-Ray : Newsgroups : povray.binaries.images : unexplained Server Time
6 Oct 2024 08:24:14 EDT (-0400)
  unexplained (Message 39 to 48 of 58)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: James Holsenback
Subject: Re: unexplained
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

From: clipka
Subject: Re: unexplained
Date: 20 Aug 2014 09:28:11
Message: <53f4a26b$1@news.povray.org>
Am 20.08.2014 15:16, schrieb James Holsenback:

> I'm confused now ... aren't
>
> #if(OTO_Get_Mask(Vec)=1)
>
> and
>
> #if(OTO_Get_Mask(Vec))
>
> functionally the same?

No,

   #if(OTO_Get_Mask(Vec))

and

   #if(OTO_Get_Mask(Vec) != 0)

are.


Post a reply to this message

From: clipka
Subject: Re: unexplained
Date: 20 Aug 2014 09:40:11
Message: <53f4a53b$1@news.povray.org>
Am 20.08.2014 15:26, schrieb James Holsenback:

> 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

Bingo!

Okay, you obviously have already figured a way around this problem by 
way of modifying OTOc.inc, and I think I now have enough information to 
go hunting for the root cause in the codebase.

I might come back to you for testing of some code modifications, if 
that's ok for you.


Post a reply to this message

From: James Holsenback
Subject: Re: unexplained
Date: 20 Aug 2014 10:00:43
Message: <53f4aa0b$1@news.povray.org>
On 08/20/2014 09:40 AM, clipka wrote:
> I might come back to you for testing of some code modifications, if
> that's ok for you.
ok fine


Post a reply to this message

From: Alain
Subject: Re: unexplained
Date: 20 Aug 2014 16:00:43
Message: <53f4fe6b$1@news.povray.org>


> I'm confused now ... aren't
>
> #if(OTO_Get_Mask(Vec)=1)
This is /true/ if and only if the result *is* 1 (one)

>
> and
>
> #if(OTO_Get_Mask(Vec))
This is /false/ if and only if the result *is* 0 (zero)

>
> functionally the same?

So, not at all *unless* the result can only be zero or one.
>
>
>

Alain


Post a reply to this message

From: James Holsenback
Subject: Re: unexplained
Date: 28 Aug 2014 13:41:55
Message: <53ff69e3@news.povray.org>
On 08/20/2014 09:40 AM, clipka wrote:
> Am 20.08.2014 15:26, schrieb James Holsenback:
>
>> 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
>
> Bingo!
>
> Okay, you obviously have already figured a way around this problem by
> way of modifying OTOc.inc, and I think I now have enough information to
> go hunting for the root cause in the codebase.
>
> I might come back to you for testing of some code modifications, if
> that's ok for you.
>

curious if you've had any time to follow up


Post a reply to this message

From: clipka
Subject: Re: unexplained
Date: 28 Aug 2014 14:08:50
Message: <53ff7032$1@news.povray.org>
Am 28.08.2014 19:41, schrieb James Holsenback:
> On 08/20/2014 09:40 AM, clipka wrote:
>> Am 20.08.2014 15:26, schrieb James Holsenback:
>>
>>> 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
>>
>> Bingo!
>>
>> Okay, you obviously have already figured a way around this problem by
>> way of modifying OTOc.inc, and I think I now have enough information to
>> go hunting for the root cause in the codebase.
>>
>> I might come back to you for testing of some code modifications, if
>> that's ok for you.
>>
>
> curious if you've had any time to follow up

Not yet, sorry.


Post a reply to this message

From: clipka
Subject: Re: unexplained
Date: 6 Jan 2015 17:43:00
Message: <54ac64f4$1@news.povray.org>
Am 28.08.2014 um 19:41 schrieb James Holsenback:
> On 08/20/2014 09:40 AM, clipka wrote:
>> Am 20.08.2014 15:26, schrieb James Holsenback:
>>
>>> 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
>>
>> Bingo!
>>
>> Okay, you obviously have already figured a way around this problem by
>> way of modifying OTOc.inc, and I think I now have enough information to
>> go hunting for the root cause in the codebase.
>>
>> I might come back to you for testing of some code modifications, if
>> that's ok for you.
>>
>
> curious if you've had any time to follow up

Now that I've returned from outer space, I have at last; can you please 
try the following patch:

At the beginning of source/base/colour.h, around line 95, replace the 
following lines:

const float kRedIntensity   = 0.297;
const float kGreenIntensity = 0.589;
const float kBlueIntensity  = 0.114;

with this:

const PreciseColourChannel kRedIntensity   = 0.297;
const PreciseColourChannel kGreenIntensity = 0.589;
const PreciseColourChannel kBlueIntensity  = 0.114;

I /think/ it should fix the issue. The culprit would then have been 
change 0ea2da4.


Post a reply to this message

From: James Holsenback
Subject: Re: unexplained
Date: 13 Jan 2015 14:02:09
Message: <54b56bb1$1@news.povray.org>
On 01/06/2015 05:42 PM, clipka wrote:
> Am 28.08.2014 um 19:41 schrieb James Holsenback:
>> On 08/20/2014 09:40 AM, clipka wrote:
>>> Am 20.08.2014 15:26, schrieb James Holsenback:
>>>
>>>> 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
>>>
>>> Bingo!
>>>
>>> Okay, you obviously have already figured a way around this problem by
>>> way of modifying OTOc.inc, and I think I now have enough information to
>>> go hunting for the root cause in the codebase.
>>>
>>> I might come back to you for testing of some code modifications, if
>>> that's ok for you.
>>>
>>
>> curious if you've had any time to follow up
>
> Now that I've returned from outer space, I have at last; can you please
> try the following patch:

Well my job (10hrs a day 7 days a week) is a black hole ...

>
> At the beginning of source/base/colour.h, around line 95, replace the
> following lines:
>
> const float kRedIntensity   = 0.297;
> const float kGreenIntensity = 0.589;
> const float kBlueIntensity  = 0.114;
>
> with this:
>
> const PreciseColourChannel kRedIntensity   = 0.297;
> const PreciseColourChannel kGreenIntensity = 0.589;
> const PreciseColourChannel kBlueIntensity  = 0.114;
>
> I /think/ it should fix the issue. The culprit would then have been
> change 0ea2da4.

I will do my best, but can't promise any sort of time frame


Post a reply to this message

From: Thomas de Groot
Subject: Re: unexplained
Date: 14 Jan 2015 03:26:37
Message: <54b6283d$1@news.povray.org>
On 13-1-2015 20:02, James Holsenback wrote:
> Well my job (10hrs a day 7 days a week) is a black hole ...

No kidding? Slavery has been prohibited as far as I know... :-\

-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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