POV-Ray : Newsgroups : povray.general : Far objects are pruned???!!! : Re: Far objects are pruned???!!! Server Time
13 Aug 2024 05:44:36 EDT (-0400)
  Re: Far objects are pruned???!!!  
From: Ronald L  Parker
Date: 1 Jan 1999 12:17:28
Message: <368d00e1.68027359@news.povray.org>
On Wed, 30 Dec 1998 02:35:58 -0500, Steven Pigeon
<pig### [at] iroumontrealca> wrote:

>
>
>Matthew Corey Brown - XenoArch wrote:
>
>> Due to prescion limitations of Float math, Povray is compiled
>> by default with the following:
>>
>> Anything below 0.001 is considered 0.0
>> Anythung beyond +/- 1e7 is non exsistant
>
>Well, pov uses DOUBLEs, and not FLOATs, and the epsilonis 1e-6...
>not 1e-3.  I've checked the source.

Check the source again.  EPSILON varies with the platform.  For 
example, the Windows source to version 3.1a uses 

#define EPSILON 1.0e-5

The default (if not specified in config.h) in frame.h is

#define EPSILON 1.0e-10

Still not 1e-3, I'll admit, but not 1e-6, either.

HOWEVER:

What Matthew said is entirely correct, if the comments in the source
are to be believed.  Note this fragment from frame.h.  Note too that
it's platform-independent:

/*
 * These values determine the minumum and maximum distances
 * that qualify as ray-object intersections.
 */

#define Small_Tolerance 0.001
#define Max_Distance 1.0e7


>However, after toying with objects, I've discovered that
>the bug is related to spheres and ellipsoids. A cube a couple
>of thousand miles wide set at a quarter millon miles is visible
>(as a pixel, granted, but still visible). A sphere, 6 k miles wide,
>(assuming a pov unit is 1 meter) at 292 000 miles is not visible.
>
>Why?
>
>I have not been able to pinpoint the bug in the source. It
>seems OK to me... still, it is not. My guess is that the epsilon
>is used in an additive way instead of multiplicative way in
>the sphere intersection routine (should be something like
>eps * dist rather than just eps).

It has been stated before, perhaps in .programming, that the sphere
intersection routine was suboptimal WRT its use of EPSILON.  I'd go
look up the exact discussion, but I'm too lazy. :)


Post a reply to this message

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