POV-Ray : Newsgroups : povray.advanced-users : Radiosity : Re: Radiosity Server Time
30 Jul 2024 12:32:48 EDT (-0400)
  Re: Radiosity  
From: Nieminen Mika
Date: 30 Jun 1999 07:01:35
Message: <3779f90f@news.povray.org>
Noah A <vip### [at] powersurfrcom> wrote:
: why is there a max value anyways i wanted to make a solar system animation
: :(

  The computer can handle only finitely large numbers.
  In a typical 32-bit computer (like PC) a floating point value takes 32
bits and a double value 64 bits. As you can see, they can only represent
certain amount of different values (which should go from as small values
as possible to as large values as possible with as small steps as possible).
  With a 64-bit value you can represent pretty large amount of numbers, but
only a finite amount of them (and sometimes a too little amount). With
these same 64 bits it should be possible to represent numbers like
0.000000001 and 100000000.
  Also the resolution has to be limited. You may be able to represent the
number 100000000 and the number 100000002 but not the number 100000001
because there's not enough bits for such a detailed precision.
  This precision problem is the reason why we need an epsilon value. Suppose
the previous case. If we have a=100000000 and b=1 and we calculate their
addition a+b, the result is not 100000001 because it can't be represented
in the floating point format, but the result is 100000000 instead.
Because of this comparing two floating point numbers together may be
pretty inaccurate. So what we do is making the comparation with certain
precision. This means that if two numbers are close enough to each other,
they are considered the same. The epsilon value states this precision.

  There's absolutely no need to represent the solar system taking a metre
as the measure unit. You can perfectly use, for example 1000 km as the unit
or even 1 AU (Astronomical Unit, ie. the distance from the Sun to the Earth).
  Actually it doesn't make sense to use a too small unit because you don't
have the distances between planets at that precision. You will only be
wasting valuable bits. It's like taking the micrometre as measure unit when
all the distances are measured in metres. There will only be six useless
zeros after each value.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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