POV-Ray : Newsgroups : povray.general : povray crashes on multiplication? : Re: povray crashes on multiplication? Server Time
31 Jul 2024 02:30:03 EDT (-0400)
  Re: povray crashes on multiplication?  
From: stevenvh
Date: 2 Dec 2007 16:15:00
Message: <web.47531fe3e9e16078e99dba500@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:

> Could you post the *full* code, including DrawBook() and without the
> '...' replacement? Or even better, remove other stuff until the code is
> "small enough" but *still* causes the crash (= a minimal testcase to
> reproduce the crash).

Hi Nicolas,
thanks for your reply. I was stripping unnecessay code until I had only a few
dozen lines left when I spotted a logical error in my code:

    #declare InvCosSl = 1 / cos ( 180 * aSlanting / pi );

should of course be

    #declare InvCosSl = 1 / cos ( pi * aSlanting / 180 );

and now it seems to be OK. Playing a bit with the argument of cos() I noticed
that POVray goes bananas if the argument falls outside [-pi/2, pi/2].
Is there any reason why it won't accept just any real number, as cos() should?

Steven


Post a reply to this message

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