POV-Ray : Newsgroups : povray.advanced-users : SOR pigmentation : Re: SOR pigmentation Server Time
26 Jun 2024 09:00:33 EDT (-0400)
  Re: SOR pigmentation  
From: Le Forgeron
Date: 23 Jul 2011 12:15:07
Message: <4e2af38b$1@news.povray.org>
> 
> I can imagine that (this is also a reply to Warp) floating point has a limiting
> accuracy, which may be critical when you deal with infinitely thin (right ?)
> surfaces like SOR.
> Of course, without looking at the algorithm, one cannot say more ...
> I am nevertheless slightly amazed by the fact that the defect vanish when you
> move the camera closer or FARTHER from the object ...

Such is the floating point precision... and its issues.

For instance, considers (you can translate in C if you like):

#declare AA=1/10;
#declare BB=1/2;

#declare SA=0;
#declare SB=0;
#local I=0;
#while(I<10)
#declare SA=SA+AA;
#declare SB=SB+BB;
#end

Bye now, what is the value of SB and SA ?
For instance, SB is 5.0;
But SA is not 1.0 (due to the fact that 1/10 cannot be represented
accurately in binary floating points)


Post a reply to this message

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