POV-Ray : Newsgroups : povray.bugreports : Bug: divide by zero in scene file causes renderer to hang : Re: divide by zero in scene file causes renderer to hang Server Time
28 Sep 2024 11:03:37 EDT (-0400)
  Re: divide by zero in scene file causes renderer to hang  
From: Jerry  Stratton
Date: 15 Nov 1998 13:18:30
Message: <jerry-1511981018300001@cx38767-a.dt1.sdca.home.com>
In article <3637636c.0@news.povray.org>, "Philippe Debar"
<phi### [at] hotmailcom> wrote:
>I found the same problem (or similar), but as it was generated
>by a (faulty) while loop, it took some times for me to find it... I

This is possibly related. I'd accidentally switched the numerator and
denominator in:

   #while (current_groove < groove_count)
      object { groove
         rotate <0,current_groove*360/groove_count,0>
      }
      #declare current_groove = current_groove + 1;
   #end

so that it read

   #while (current_groove < groove_count)
      object { groove
         rotate <0,groove_count*360/current_groove,0>
      }
      #declare current_groove = current_groove + 1;
   #end

This was part of a difference; and current_groove starts from zero. There
was no error generated by the divide by zero; the difference object simply
didn't appear in the scene. It took me a bit to find the error because I
was looking for an error in size or translation rather than what I would
normally consider a fatal error in my code.

My fault, of course, but I would expect that divide by zero would generate
some sort of message.

Jerry
jer### [at] hoboescom   
http://www.hoboes.com/jerry/                   e-mail hel### [at] hoboescom
What Your Children Are Doing: http://www.hoboes.com/html/NetLife/Children/


Post a reply to this message

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