POV-Ray : Newsgroups : povray.general : um... Server Time
5 Nov 2024 14:20:50 EST (-0500)
  um... (Message 1 to 7 of 7)  
From: Tim Cook
Subject: um...
Date: 27 Jan 2005 14:24:58
Message: <41f9400a$1@news.povray.org>
the following scene

#include "math.inc"
#declare r=1;
#declare d=0.1;
#declare ridges=24;
isosurface{
   function{ sqrt(x*x+y*y)-r - (cos(atan(y/x)*ridges)*d) }
   threshold 0
   max_gradient 2
   contained_by {box{<-1,-1,0>, <1,1,1>}}
   texture{pigment{color rgb 1 transmit 0.5}}
}

gives the following error

File: C:\Data\3D\bumpycyl.inc  Line: 5
Fatal Error: Floating-point exception detected in function ''. Your 
function either attempted a division by zero, used a function outside 
its domain or called an internal function with invalid parameters.

but only if antialiasing is turned on, and then not at all camera angles.

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: ABX
Subject: Re: um...
Date: 27 Jan 2005 14:55:09
Message: <uchiv0d1iq26r069oi5htepeasqhiokd92@4ax.com>
On Thu, 27 Jan 2005 14:24:57 -0500, Tim Cook <z99### [at] bellsouthnet> wrote:
> #include "math.inc"
> #declare r=1;
> #declare d=0.1;
> #declare ridges=24;
> isosurface{
>    function{ sqrt(x*x+y*y)-r - (cos(atan(y/x)*ridges)*d) }
>    threshold 0
>    max_gradient 2
>    contained_by {box{<-1,-1,0>, <1,1,1>}}
>    texture{pigment{color rgb 1 transmit 0.5}}
> }
>
> gives the following error
>
> File: C:\Data\3D\bumpycyl.inc  Line: 5
> Fatal Error: Floating-point exception detected in function ''. Your 
> function either attempted a division by zero, used a function outside 
> its domain or called an internal function with invalid parameters.

Some answers I can imagine are:

1) you have librarypath set with some math.inc different than the one from
POV-Ray
2) you have some ini setting which cause inclusion of other file (+HI)
3) memory corruption

try to exclude any of them to find real problem.

> but only if antialiasing is turned on, and then not at all camera angles.

Can you duplicate this exactly the same after rest(art) of your computer?

ABX


Post a reply to this message

From: "Jérôme M. Berger"
Subject: Re: um...
Date: 27 Jan 2005 15:54:57
Message: <41f95521$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Cook wrote:
|   function{ sqrt(x*x+y*y)-r - (cos(atan(y/x)*ridges)*d) }
~                                          ^^^
	I'm guessing that at some camera angles you'll have a ray where POV
attempts to evaluate the function for x==0 which will produce the error.

	When using AA, you shoot more rays which increases the probability
that one will encounter the problem, but it should be possible to
find a camera position that will cause it too...

		Jerome
- --
******************************
*      Jerome M. Berger      *
* mailto:jbe### [at] ifrancecom *
*  http://jeberger.free.fr/  *
******************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFB+VUfqIYJdJhyixIRAsp3AKCMQpQsiJqoQ/lGOCxGeTPXx2taNACeMeSn
QNloxYof/t1iEwKEWIXaPwc=
=gaJ4
-----END PGP SIGNATURE-----


Post a reply to this message

From: Slime
Subject: Re: um...
Date: 27 Jan 2005 16:14:01
Message: <41f95999$1@news.povray.org>
> |   function{ sqrt(x*x+y*y)-r - (cos(atan(y/x)*ridges)*d) }
> ~                                          ^^^


You can try replacing atan(y/x) by atan2(y,x) which avoids the division by
zero and also avoids the problem that 1/2 is equal to -1/-2 and thereby
gives more useful results for all values of x and y.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Tim Cook
Subject: Re: um...
Date: 27 Jan 2005 18:58:55
Message: <41f9803f$1@news.povray.org>
Slime wrote:
> You can try replacing atan(y/x) by atan2(y,x) which avoids the division by
> zero and also avoids the problem that 1/2 is equal to -1/-2 and thereby
> gives more useful results for all values of x and y.

Whee, that fixed it.  Thanks!

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: ABX
Subject: Re: um...
Date: 28 Jan 2005 07:29:52
Message: <vsbkv09v6cpojcgrmfppj5448pceo5l8jl@4ax.com>
On Thu, 27 Jan 2005 20:54:46 +0100, ABX <abx### [at] abxartpl> wrote:
> > File: C:\Data\3D\bumpycyl.inc  Line: 5
> > Fatal Error: Floating-point exception detected in function ''. Your 
> > function either attempted a division by zero, used a function outside 
> > its domain or called an internal function with invalid parameters.
>
> Some answers I can imagine are

Oups. Forget my guessing. I'm so used to the ".pov" extension of the rendered
scene that I was mistaken by ".inc" that you refering inclusion of unknown
file and did not carefully readed rest of the message. Of course others were
smarter than me.

ABX


Post a reply to this message

From: Eli
Subject: Re: um...
Date: 31 Jan 2005 20:22:42
Message: <41fed9e2@news.povray.org>
I like this


Post a reply to this message

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