POV-Ray : Newsgroups : povray.beta-test : Infinity bug (?) Server Time
31 Oct 2024 23:18:53 EDT (-0400)
  Infinity bug (?) (Message 1 to 2 of 2)  
From: Redbeard (MDJohnson)
Subject: Infinity bug (?)
Date: 27 Sep 2001 01:44:36
Message: <3bb2bcc4@news.povray.org>
(POV-Ray 3.5beta4, AMD Athlon 700, 192MB RAM)

I believe I've found a bug involving infinity.  Consider the following code:
#include "stdinc.inc"
#declare X = vnormalize(o);

#debug concat(vstr(3,X,",",0,-1), "\n")

#declare I = 0;
#while (I < 10)
 sphere { X, 1 pigment { White } finish { ambient 1 } }
 #declare I = I + 1;
#end

camera { location -z * 20 look_at 0 }

The output is:
  -1.#IND00,-1.#IND00,-1.#IND00

  Scene contains 10 frame level objects; 0 infinite.
  Reallocing Finite to 30

If I then increase the limit for I to 11 POV-Ray shuts down uncermoniously
while creating bounding slabs.

Granted, vnormalize(<0,0,0>) shouldn't work right, but I'd rather it give an
error than continue in such a strange fashion.

(BTW, If you set the precision to 2 you get '-1.#J,-1.#J,-1.#J', really
weird :-)

Any thoughts?

Michael


Post a reply to this message

From: Redbeard (MDJohnson)
Subject: Re: Infinity bug (?)
Date: 1 Oct 2001 00:04:17
Message: <3bb7eb41$1@news.povray.org>
I've done a bit more testing on this.  It doesn't matter if you're rendering
to a PNG or a BMP, it occurs with both, so even if it's related to the PNG
bug, it is different.

BTW, has anyone been able to verify this?

Thanks,
Michael
"Redbeard (MDJohnson)" <red### [at] wvadelphianet> wrote in message
news:3bb2bcc4@news.povray.org...
> (POV-Ray 3.5beta4, AMD Athlon 700, 192MB RAM)
>
> I believe I've found a bug involving infinity.  Consider the following
code:
> #include "stdinc.inc"
> #declare X = vnormalize(o);
>
> #debug concat(vstr(3,X,",",0,-1), "\n")
>
> #declare I = 0;
> #while (I < 10)
>  sphere { X, 1 pigment { White } finish { ambient 1 } }
>  #declare I = I + 1;
> #end
>
> camera { location -z * 20 look_at 0 }
>
> The output is:
>   -1.#IND00,-1.#IND00,-1.#IND00
>
>   Scene contains 10 frame level objects; 0 infinite.
>   Reallocing Finite to 30
>
> If I then increase the limit for I to 11 POV-Ray shuts down uncermoniously
> while creating bounding slabs.
>
> Granted, vnormalize(<0,0,0>) shouldn't work right, but I'd rather it give
an
> error than continue in such a strange fashion.
>
> (BTW, If you set the precision to 2 you get '-1.#J,-1.#J,-1.#J', really
> weird :-)
>
> Any thoughts?
>
> Michael
>
>
>
>


Post a reply to this message

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