POV-Ray : Newsgroups : povray.advanced-users : Divide by Zero Error ? : Re: Divide by Zero Error ? Server Time
2 Nov 2024 13:17:45 EDT (-0400)
  Re: Divide by Zero Error ?  
From: Arthur Flint
Date: 9 Aug 1999 02:14:07
Message: <37AE7180.98A70012@gci.net>
I think the arrows(<=========<<<<<<<) will show the problem.
Change #declare X=0; to #declare X=.00001 and it works fine.

Ken wrote:

> Is this causing a divide by zero error or ? It gets past parsing but
> when is gets to building bounding slabs it crashes Pov violently.
>
> camera{location<0,20,20>look_at 0}
>
> light_source{<0,50,100> rgb 1}
>
> #declare Y = 0; <=========<<<<<<<
> #while (Y < 50)
>        #declare X = 0;
>        #while (X < 50)
>               sphere {
>                      <X, Y, sin(X/Y)>, 0.1 <=========<<<<<<<
>                      pigment {color rgb<(sin(X/Y) + 1)/2, 0,
> 0>}<=========<<<<<<<
>               }
>               #declare X = X + 1;
>        #end
>        #declare X = 0;
>        #declare Y = Y + 1;
> #end
>
> --
> Ken Tyler
> http://home.pacbell.net/tylereng/index.html
> I know you are but what am I ? <Unknown child>


Post a reply to this message

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