POV-Ray : Newsgroups : povray.beta-test : Parser Statistics anomaly Server Time
22 Dec 2024 19:28:30 EST (-0500)
  Parser Statistics anomaly (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: James Holsenback
Subject: Parser Statistics anomaly
Date: 6 Dec 2012 10:53:18
Message: <50c0bf6e$1@news.povray.org>
Simple scene:
---
#version 3.7;

camera{ location <0,2,-10> look_at <0,0,0> right 
x*image_width/image_height direction z*1 }
light_source{ <0,5,-10>,1 rotate y*45 }

global_settings {
	assumed_gamma 1.0
	}

#include "colors.inc"

#declare SkyDome =
sphere{0, 1 hollow
	texture {
   	pigment { srgb 1 }
		finish {
			ambient 0
			diffuse 0.6
			}
		}
	}

object { SkyDome rotate x*0 rotate y*0	scale 5000}
---

noticed an oddity with the infinite/finite object count reporting ... 
play with scale of the SkyDome object ... as is it's calling the object 
Infinite?


Post a reply to this message

From: Le Forgeron
Subject: Re: Parser Statistics anomaly
Date: 6 Dec 2012 11:33:15
Message: <50c0c8cb$1@news.povray.org>
Le 06/12/2012 16:53, James Holsenback nous fit lire :
> Simple scene:
> ---
> #version 3.7;
> 
> camera{ location <0,2,-10> look_at <0,0,0> right
> x*image_width/image_height direction z*1 }
> light_source{ <0,5,-10>,1 rotate y*45 }
> 
> global_settings {
>     assumed_gamma 1.0
>     }
> 
> #include "colors.inc"
> 
> #declare SkyDome =
> sphere{0, 1 hollow
>     texture {
>       pigment { srgb 1 }
>         finish {
>             ambient 0
>             diffuse 0.6
>             }
>         }
>     }
> 
> object { SkyDome rotate x*0 rotate y*0    scale 5000}
> ---
> 
> noticed an oddity with the infinite/finite object count reporting ...
> play with scale of the SkyDome object ... as is it's calling the object
> Infinite?

an object is considered infinite when it is big enough... or rather its
bounding (box) is big enough. How is big computed ? It's a volume. Above
2.0e+10, it's big.
So, a cylinder/cone along an axis could be 10 000 000 long and be finite.
The same on a diagonal of face (49 999 988 518 489 square-unit for the
same length, if I do not fail the computation of the projected length on
the axis) is infinite. Just because the bounding box get promoted to a
big empty box.

your skydome:
radius = 5000, so diameter 10000, in a box that's a volume of 10^12.
Which is bigger than the 2.0e+10.


Post a reply to this message

From: James Holsenback
Subject: Re: Parser Statistics anomaly
Date: 6 Dec 2012 11:39:41
Message: <50c0ca4d$1@news.povray.org>
On 12/06/2012 11:33 AM, Le_Forgeron wrote:
> Le 06/12/2012 16:53, James Holsenback nous fit lire :
>> Simple scene:
>> ---
>> #version 3.7;
>>
>> camera{ location <0,2,-10> look_at <0,0,0> right
>> x*image_width/image_height direction z*1 }
>> light_source{ <0,5,-10>,1 rotate y*45 }
>>
>> global_settings {
>>      assumed_gamma 1.0
>>      }
>>
>> #include "colors.inc"
>>
>> #declare SkyDome =
>> sphere{0, 1 hollow
>>      texture {
>>        pigment { srgb 1 }
>>          finish {
>>              ambient 0
>>              diffuse 0.6
>>              }
>>          }
>>      }
>>
>> object { SkyDome rotate x*0 rotate y*0    scale 5000}
>> ---
>>
>> noticed an oddity with the infinite/finite object count reporting ...
>> play with scale of the SkyDome object ... as is it's calling the object
>> Infinite?
>
> an object is considered infinite when it is big enough... or rather its
> bounding (box) is big enough.

play around with the scaling and see when it starts to call it finite ;-)


Post a reply to this message

From: Le Forgeron
Subject: Re: Parser Statistics anomaly
Date: 6 Dec 2012 13:16:00
Message: <50c0e0e0$1@news.povray.org>
Le 06/12/2012 17:39, James Holsenback nous fit lire :
> 
> play around with the scaling and see when it starts to call it finite ;-)

I don't play... I cheat & I looked at the code.
In parse.cpp, BOUNDS_VOLUME is an inline function from bbox.h which
compute the volume of the bounding box (simple product of height, width
& depth).
INFINITE_VOLUME is the limit to set the infinite flag.
The value of INFINITE_VOLUME is BOUND_HUGE. (parse.cpp)
The value of BOUND_HUGE is 2.0e+10 (configbackend.h)

So, the sphere is to become finite when the box (true cube) is to have a
volume of 2.0e+10 or less. That's for a side of 2714.4176 (cubic root of
2.0e+10), so for a radius of 1357.2088


Post a reply to this message

From: Warp
Subject: Re: Parser Statistics anomaly
Date: 6 Dec 2012 13:30:18
Message: <50c0e43a@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> an object is considered infinite when it is big enough...

What exactly is the advantage of this?

-- 
                                                          - Warp


Post a reply to this message

From: James Holsenback
Subject: Re: Parser Statistics anomaly
Date: 6 Dec 2012 13:48:17
Message: <50c0e871$1@news.povray.org>
On 12/06/2012 01:15 PM, Le_Forgeron wrote:
> Le 06/12/2012 17:39, James Holsenback nous fit lire :
>>
>> play around with the scaling and see when it starts to call it finite ;-)
>
> I don't play... I cheat & I looked at the code.
> In parse.cpp, BOUNDS_VOLUME is an inline function from bbox.h which
> compute the volume of the bounding box (simple product of height, width
> & depth).
> INFINITE_VOLUME is the limit to set the infinite flag.
> The value of INFINITE_VOLUME is BOUND_HUGE. (parse.cpp)
> The value of BOUND_HUGE is 2.0e+10 (configbackend.h)
>
> So, the sphere is to become finite when the box (true cube) is to have a
> volume of 2.0e+10 or less. That's for a side of 2714.4176 (cubic root of
> 2.0e+10), so for a radius of 1357.2088

Yes ... obviously the program is catching something, I guess I'm 
challenging /what/ it's catching. Again I'm encouraging you to /play/ 
around with the scaling in my example and note /when/ it starts calling 
the object finite ;-)


Post a reply to this message

From: clipka
Subject: Re: Parser Statistics anomaly
Date: 6 Dec 2012 15:44:07
Message: <50c10397$1@news.povray.org>
Am 06.12.2012 19:48, schrieb James Holsenback:
> On 12/06/2012 01:15 PM, Le_Forgeron wrote:
>> Le 06/12/2012 17:39, James Holsenback nous fit lire :
>>>
>>> play around with the scaling and see when it starts to call it finite
>>> ;-)
>>
>> I don't play... I cheat & I looked at the code.
>> In parse.cpp, BOUNDS_VOLUME is an inline function from bbox.h which
>> compute the volume of the bounding box (simple product of height, width
>> & depth).
>> INFINITE_VOLUME is the limit to set the infinite flag.
>> The value of INFINITE_VOLUME is BOUND_HUGE. (parse.cpp)
>> The value of BOUND_HUGE is 2.0e+10 (configbackend.h)
>>
>> So, the sphere is to become finite when the box (true cube) is to have a
>> volume of 2.0e+10 or less. That's for a side of 2714.4176 (cubic root of
>> 2.0e+10), so for a radius of 1357.2088
>
> Yes ... obviously the program is catching something, I guess I'm
> challenging /what/ it's catching. Again I'm encouraging you to /play/
> around with the scaling in my example and note /when/ it starts calling
> the object finite ;-)

So, what are the results of /your/ playing around that makes you think 
we should bother to try it as well?


Post a reply to this message

From: clipka
Subject: Re: Parser Statistics anomaly
Date: 6 Dec 2012 15:46:22
Message: <50c1041e@news.povray.org>
Am 06.12.2012 19:30, schrieb Warp:
> Le_Forgeron <jgr### [at] freefr> wrote:
>> an object is considered infinite when it is big enough...
>
> What exactly is the advantage of this?

If an object is virtually everywhere, testing against its bounding box 
is wasted computing time.


Post a reply to this message

From: James Holsenback
Subject: Re: Parser Statistics anomaly
Date: 6 Dec 2012 16:16:54
Message: <50c10b46$1@news.povray.org>
On 12/06/2012 03:44 PM, clipka wrote:
> Am 06.12.2012 19:48, schrieb James Holsenback:
>> On 12/06/2012 01:15 PM, Le_Forgeron wrote:
>>> Le 06/12/2012 17:39, James Holsenback nous fit lire :
>>>>
>>>> play around with the scaling and see when it starts to call it finite
>>>> ;-)
>>>
>>> I don't play... I cheat & I looked at the code.
>>> In parse.cpp, BOUNDS_VOLUME is an inline function from bbox.h which
>>> compute the volume of the bounding box (simple product of height, width
>>> & depth).
>>> INFINITE_VOLUME is the limit to set the infinite flag.
>>> The value of INFINITE_VOLUME is BOUND_HUGE. (parse.cpp)
>>> The value of BOUND_HUGE is 2.0e+10 (configbackend.h)
>>>
>>> So, the sphere is to become finite when the box (true cube) is to have a
>>> volume of 2.0e+10 or less. That's for a side of 2714.4176 (cubic root of
>>> 2.0e+10), so for a radius of 1357.2088
>>
>> Yes ... obviously the program is catching something, I guess I'm
>> challenging /what/ it's catching. Again I'm encouraging you to /play/
>> around with the scaling in my example and note /when/ it starts calling
>> the object finite ;-)
>
> So, what are the results of /your/ playing around that makes you think
> we should bother to try it as well?
>

LOL ... starting with the simple scene it does not report finite until 
scale is set to 1000


Post a reply to this message

From: clipka
Subject: Re: Parser Statistics anomaly
Date: 7 Dec 2012 00:20:33
Message: <50c17ca1$1@news.povray.org>
Am 06.12.2012 22:16, schrieb James Holsenback:

> LOL ... starting with the simple scene it does not report finite until
> scale is set to 1000

 From the math, the threshold should be between 1357 and 1358 if the 
sphere is just transformed and/or rotated. (If a rotation is applied via 
an arbitrary matrix, the threshold might be as low as 783 to 784 in 
extreme cases.)

An infinite object is not excluded from bounding /per se/, but does not 
benefit from /hierarchical/ bounding.

(Fun fact: Spheres have such a simple math that they skip bounding box 
testing entirely, so they only benefit from hierarchical bounding at all.)


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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