POV-Ray : Newsgroups : povray.general : Precision of large objects Server Time
2 Nov 2024 09:20:32 EDT (-0400)
  Precision of large objects (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: SharkD
Subject: Precision of large objects
Date: 26 Aug 2009 06:34:15
Message: <4a950fa7$1@news.povray.org>
Assuming my units of measurement 1 Povray unit, how big can I make 
things before precision errors become a problem? I.e. what is the 
"range" of scales that will still work?

-Mike


Post a reply to this message

From: clipka
Subject: Re: Precision of large objects
Date: 26 Aug 2009 07:22:42
Message: <4a951b02$1@news.povray.org>
SharkD schrieb:
> Assuming my units of measurement 1 Povray unit, how big can I make 
> things before precision errors become a problem? I.e. what is the 
> "range" of scales that will still work?

That depends on what you actually want to do.

Any values in the order of 1.0e+17 or above are destined to get you into 
utter trouble.

Distances between camera and objects, between different objects, or 
between parts of an object, in the order of 1.0e+7 or above will mess up 
various ray-object intersection tests.

Object sizes in the order of 1.0e+6 or above will disengage the bounding 
mechanism for that object.

It is also recommended to place the scene near the coordinate origin, as 
that's where computations can be done with highest precision; if the 
smallest details you expect to see are X units in size, they should be 
no further away from the coordinate origin than X * 1.0e+7 units, 
otherwise bounding box and other mechanisms will freak out.


Post a reply to this message

From: scott
Subject: Re: Precision of large objects
Date: 26 Aug 2009 07:23:29
Message: <4a951b31$1@news.povray.org>
> Assuming my units of measurement 1 Povray unit, how big can I make things 
> before precision errors become a problem? I.e. what is the "range" of 
> scales that will still work?

Try a simple 1-line scene like this:

sphere{ <0,0,1> .4 scale X pigment{color rgb 10}}

And increase X until the sphere disappears, on my system X=2e7 doesn't 
render.


Post a reply to this message

From: SharkD
Subject: Re: Precision of large objects
Date: 26 Aug 2009 07:59:59
Message: <4a9523bf$1@news.povray.org>
scott wrote:
>> Assuming my units of measurement 1 Povray unit, how big can I make 
>> things before precision errors become a problem? I.e. what is the 
>> "range" of scales that will still work?
> 
> Try a simple 1-line scene like this:
> 
> sphere{ <0,0,1> .4 scale X pigment{color rgb 10}}
> 
> And increase X until the sphere disappears, on my system X=2e7 doesn't 
> render.

Awesome, thanks!

-Mike


Post a reply to this message

From: Warp
Subject: Re: Precision of large objects
Date: 26 Aug 2009 11:57:03
Message: <4a955b4f@news.povray.org>
scott <sco### [at] scottcom> wrote:
> Try a simple 1-line scene like this:

> sphere{ <0,0,1> .4 scale X pigment{color rgb 10}}

> And increase X until the sphere disappears, on my system X=2e7 doesn't 
> render.

  AFAIK that's not because of precision, but because of an explicit limit
in the source code for such things.

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Precision of large objects
Date: 26 Aug 2009 16:45:59
Message: <4a959f07$1@news.povray.org>
Warp schrieb:
>> And increase X until the sphere disappears, on my system X=2e7 doesn't 
>> render.
> 
>   AFAIK that's not because of precision, but because of an explicit limit
> in the source code for such things.

That is so indeed.


Post a reply to this message

From: scott
Subject: Re: Precision of large objects
Date: 31 Aug 2009 04:27:55
Message: <4a9b898b$1@news.povray.org>
>> And increase X until the sphere disappears, on my system X=2e7 doesn't
>> render.
>
>  AFAIK that's not because of precision, but because of an explicit limit
> in the source code for such things.

Is the purpose of the explicit limit to hide precision errors becoming 
visible?

Why is the limit so low, 2e7 is absolutely tiny compared to the 64-bit 
floating point range of 1e300 or whatever it is (which presumably POV uses).


Post a reply to this message

From: clipka
Subject: Re: Precision of large objects
Date: 31 Aug 2009 06:25:19
Message: <4a9ba50f$1@news.povray.org>
scott schrieb:
> Why is the limit so low, 2e7 is absolutely tiny compared to the 64-bit 
> floating point range of 1e300 or whatever it is (which presumably POV 
> uses).

Personally, I have the impression that the rationale behind most of 
these limits has been lost in obscurity by now.


Post a reply to this message

From: Alain
Subject: Re: Precision of large objects
Date: 31 Aug 2009 13:54:59
Message: <4a9c0e73$1@news.povray.org>

>>> And increase X until the sphere disappears, on my system X=2e7 doesn't
>>> render.
>>
>>  AFAIK that's not because of precision, but because of an explicit limit
>> in the source code for such things.
> 
> Is the purpose of the explicit limit to hide precision errors becoming 
> visible?
> 
> Why is the limit so low, 2e7 is absolutely tiny compared to the 64-bit 
> floating point range of 1e300 or whatever it is (which presumably POV 
> uses).
> 
> 
If you have a value of about 1e100, then, the last digit presision would 
be about 1e90 to 1e93. This is a serious loss of precision.


Alain


Post a reply to this message

From: Warp
Subject: Re: Precision of large objects
Date: 31 Aug 2009 14:28:55
Message: <4a9c1667@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:
> If you have a value of about 1e100, then, the last digit presision would 
> be about 1e90 to 1e93. This is a serious loss of precision.

  Note that a double-precision floating point number (which is 64 bits
in size) has only 53 bits of precision for the base. That's approximately
15 digits of precision in base 10. (In other words, if you try to store
a number with more significant decimal digits than 15 into such a floating
point value, the lower ones will just be lost.)

  I assume 1e7 was chose as half of that.

-- 
                                                          - Warp


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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