POV-Ray : Newsgroups : povray.advanced-users : Divide by Zero Error ? Server Time
26 Nov 2024 22:44:48 EST (-0500)
  Divide by Zero Error ? (Message 1 to 10 of 20)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Ken
Subject: Divide by Zero Error ?
Date: 8 Aug 1999 20:34:59
Message: <37AE20A5.A80C4782@pacbell.net>
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

From: Ron Parker
Subject: Re: Divide by Zero Error ?
Date: 8 Aug 1999 22:08:15
Message: <37ae3797.116490116@news.povray.org>
On Sun, 08 Aug 1999 17:28:21 -0700, Ken <tyl### [at] pacbellnet> 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.

The crash is not a divide by zero error.  I'm not sure what it is, but
it might be a stack fault.  It crashes somewhere deep within the
Visual C++ runtime library for me, in the process of doing a malloc 
under a pile of calls to sort_and_split.  In short, I have no idea
what you did here. :)


Post a reply to this message

From: Ken
Subject: Re: Divide by Zero Error ?
Date: 8 Aug 1999 23:01:58
Message: <37AE4302.DD6F29C5@pacbell.net>
Ron Parker wrote:
> 
> On Sun, 08 Aug 1999 17:28:21 -0700, Ken <tyl### [at] pacbellnet> 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.
> 
> The crash is not a divide by zero error.  I'm not sure what it is, but
> it might be a stack fault.  It crashes somewhere deep within the
> Visual C++ runtime library for me, in the process of doing a malloc
> under a pile of calls to sort_and_split.  In short, I have no idea
> what you did here. :)

Do you think it's a bug and maybe someone should report it ? You could
probably word it in programmerese better than I if you feel it is worth
bringing to the teams attention.

-- 
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

From: Arthur Flint
Subject: Re: Divide by Zero Error ?
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

From: Arthur Flint
Subject: Re: Divide by Zero Error ?
Date: 9 Aug 1999 02:18:40
Message: <37AE7292.D03BDF3D@gci.net>
Arthur Flint wrote:

> I think the arrows(<=========<<<<<<<) will show the problem.
> Change #declare X=0; to #declare X=.00001 and it works fine.

I can't even read the code right. Change #declare Y=0; to #declare
Y=.00001 and it works fine.


Post a reply to this message

From: Nieminen Mika
Subject: Re: Divide by Zero Error ?
Date: 9 Aug 1999 02:46:28
Message: <37ae7944@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:

: #declare Y = 0;
:                      <X, Y, sin(X/Y)>, 0.1

  You should always avoid this kind of divisions.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ken
Subject: Re: Divide by Zero Error ?
Date: 9 Aug 1999 02:57:12
Message: <37AE7A11.78219F12@pacbell.net>
Nieminen Mika wrote:
> 
> Ken <tyl### [at] pacbellnet> wrote:
> 
> : #declare Y = 0;
> :                      <X, Y, sin(X/Y)>, 0.1
> 
>   You should always avoid this kind of divisions.

  Can I assume this is because before the count is incremented there is
a zero value for the division ?

-- 
Ken Tyler

See my 700+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Alan Kong
Subject: Re: Divide by Zero Error ?
Date: 9 Aug 1999 02:57:30
Message: <37af7add.2479942@news.povray.org>
On Sun, 08 Aug 1999 17:28:21 -0700, Ken <tyl### [at] pacbellnet> wrote:

>I know you are but what am I ? <Unknown child>

  The quote is Paul Reubens (Pee-wee Herman), probably from the movie
"Pee-wee's Big Adventure". As you may recall, Mr. Reubens was sort of
blacklisted after an incident in an adult movie house involving no one else
but himself. He has washed his hands of that whole affair and has been
working steadily in recent years.

-- 
Alan
--------------------------------------------------------------------
http://www.povray.org - Home of the Persistence of Vision Ray Tracer
news.povray.org - where POV-Ray enthusiasts around the world can get
together to exchange ideas, information, and experiences with others
--------------------------------------------------------------------


Post a reply to this message

From: Ken
Subject: Re: Divide by Zero Error ?
Date: 9 Aug 1999 03:02:29
Message: <37AE7B4F.20455CC7@pacbell.net>
Alan Kong wrote:
> 
> On Sun, 08 Aug 1999 17:28:21 -0700, Ken <tyl### [at] pacbellnet> wrote:
> 
> >I know you are but what am I ? <Unknown child>
> 
>   The quote is Paul Reubens (Pee-wee Herman), probably from the movie
> "Pee-wee's Big Adventure".

  I'll grant that Pee-Wee may have used the line but it is by know means his
creation. I know this because I used it myself as a child and that predates
the Pee-Wee character by at least a couple of years :)

> As you may recall, Mr. Reubens was sort of blacklisted after an incident
> in an adult movie house involving no one else but himself. He has washed
> his hands of that whole affair and has been working steadily in recent years.
> 
> --
> Alan

Oh you mean Mr. Trenchcoat. I seem to remember something about that.

-- 
Ken Tyler

See my 700+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Arthur Flint
Subject: Re: Divide by Zero Error ?
Date: 9 Aug 1999 03:42:16
Message: <37AE862B.2989040C@gci.net>
Arthur Flint wrote:

> Arthur Flint wrote:
>
> > I think the arrows(<=========<<<<<<<) will show the problem.
> > Change #declare X=0; to #declare X=.00001 and it works fine.
>
> I can't even read the code right. Change #declare Y=0; to #declare
> Y=.00001 and it works fine.

Ken,
    Your code let me play some and I will post a picture in the p.b.i.
I think this is sort of what you were after.
Mr. Art


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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