POV-Ray : Newsgroups : povray.beta-test : Philosophical objection to fog distance=0 : Re: 3.1g & 3.5 bug report Server Time
30 Jul 2024 12:25:47 EDT (-0400)
  Re: 3.1g & 3.5 bug report  
From:
Date: 6 Nov 2001 10:59:56
Message: <kv1gut8247bkoa6o7t01pcb8pg2gbt0n27@4ax.com>
On Tue, 06 Nov 2001 10:39:40 -0500, "Greg M. Johnson"
<"gregj56590[:-0]"@aol.com> wrote:

> This bug-carry-over-from 3.1g could be fixed by changing:
> PIXEL_COLOR = exp(-d/D) * OBJECT_COLOR + (1-exp(-d/D)) * FOG_COLOR
> to
> PIXEL_COLOR = exp(-d/(D+GGG)) * OBJECT_COLOR + (1-exp(-d/(D+GGG))) * FOG_COLOR
> Where GGG= an infitesimal, just bigger than the smallest number pov can handle

Balancing between floating point accuracy and division by zero is rather not
very best thing. "The smallest number pov can handle" depends on platform.
Morover why this addition should be done for all values (even large integers)?
It is rather bug in parser which allows even "distance -1".

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

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