POV-Ray : Newsgroups : povray.binaries.images : Ringworld re-re-revisited : Re: Ringworld re-re-revisited Server Time
29 Apr 2024 15:06:39 EDT (-0400)
  Re: Ringworld re-re-revisited  
From: David Buck
Date: 29 Oct 2005 07:36:56
Message: <43635ed8$1@news.povray.org>
Thomas de Groot wrote:
> "Bill Pragnell" <bil### [at] hotmailcom> schreef in bericht
> news:web.4362127eca18a3ea731f01d10@news.povray.org...
>>Firstly, Thomas, do you see the same thing with your Ring?
>>Secondly, can anyone clarify what exactly is happening here? Is it a
>>precision problem, or something else?
>>
> 
> 
> Yes, Bill. The same happens with my Ring. If I lower my camera towards the
> surface I get exactly the same artifacts.
> 
> Thomas

I've run into problems like this before.  POVRay is designed for 
rendering scenes of "normal" sizes where "normal" is in the range of 
arount 100,000 units from the origin.

When using floating point numbers, you can't test for exactly 0 because 
floats are always slightly inaccurate.  Instead, you have to test for 
numbers smaller than some epsilon value.

There's a value called EPSILON (see frame.h) which defines a small value 
and anything smaller would be considered 0 in some of the calculations. 
  This value is set to 1e-10 which is dangerously close in magnitude to 
1 / 90,000,000 (the scale of Ringworld).

To solve this problem, you may have to try decreasing the epsilon value 
and recompiling POVRay.  You may still run into problems, though, 
because doubles may not have enough precision to handle the 
calculations.  You may come up with calculations like

	90,000,000.00000012 - 90,000,000.0000001

The correct answer should be 0.00000002, but the numbers just can't 
represent 90,000,000.00000012 accurately.  That's the nature of limited 
precision floating point calculations. It's bad news for people trying 
to render Ringworld, though.

Hope this helps
David Buck


Post a reply to this message

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