|
![](/i/fill.gif) |
Stefaan De Roeck nous apporta ses lumieres en ce 2008/04/10 09:42:
> Alain wrote:
>> Problems with floating point rounding errors.
>> An easy solution:
>> Scale your scene by 100 and divide the density by 100 and the cross is
>> almost gone. Increase that to 1000 and you no longer see the artefacts.
>
> Strange, but it works. But how can it? Floating point numbers are
> represented by radix and exponent. Usually errors are introduced when
> e.g. subtracting two similar numbers, thus challenging the radix'
> accuracy. Those cannot be solved by such scaling, suggesting the
> exponent in the floating point does not suffice to represent
> intermediate results. Supposing double precision floats, this would
> mean some significant intermediate results are between 2^(-1024) and
> 2^(-1024)/1000?
> In any case I'm happy to have a workaround, but I'm still trying to
> understand the source of the problems.
>
>>
>> A question: Why use a lathe when you have the cone primitive?
>>
>
> Because I lack adequate knowledge on the primitives :)
Experiment with the primitives, and gain practical knowlege of them.
>
> Thanks!
In fact, the artefacts are still there, but they become smaller, sub-pixel. When
you scale up, the integer part become larger. You don't get rounding errors on
the integer part, only in the fractional part. When you scale up, the fractional
part become less and less importent, reducing the errors.
--
Alain
-------------------------------------------------
After any salary raise, you will have less money at the end of the month than
you did before.
Post a reply to this message
|
![](/i/fill.gif) |