POV-Ray : Newsgroups : povray.bugreports : Crashed 3.7 beta 29 using isosurface and sqrt Server Time
22 Dec 2024 17:53:42 EST (-0500)
  Crashed 3.7 beta 29 using isosurface and sqrt (Message 1 to 3 of 3)  
From: FainAvis
Subject: Crashed 3.7 beta 29 using isosurface and sqrt
Date: 31 Dec 2008 00:40:00
Message: <web.495b052d8e7a19918c15b9870@news.povray.org>
/*
The code below crashed Povray 3.7 beta 29 and wrote a dump file. I was tryig to
follow Mike William's excellent isosurface tutorial.
I clipped the formula F() directly from his page and ran it.
I suspected use of vectors in sqrt() triggered the crash so I attempted to use
function F() to declare Fr.
That gives an error vectors found, expected float.


*/
#declare R = 3;
#declare  F = function(x,y,z) { F(x, sqrt((y*y+z*z)), z) }  // bug here

//#declare Fr = F(x,y,z);    // This line inserted after crash of following code
                           // brings error requires float not vector.
                           // When I used function F() in isosurface
                           // povray crashed.

//////
isosurface {
 function {F(x,y,z)}

        max_gradient 3.4  // increased fom 2.4 because of rectangular
                          //cutout in object
        accuracy 0.001
        contained_by{sphere{0,R}}
        pigment {rgb .9}
        finish {phong 0.5 phong_size 10}
}


Post a reply to this message

From: clipka
Subject: Re: Crashed 3.7 beta 29 using isosurface and sqrt
Date: 31 Dec 2008 02:35:00
Message: <web.495b1f8a810c53fa483cfa400@news.povray.org>
"FainAvis" <nomail@nomail> wrote:
> #declare  F = function(x,y,z) { F(x, sqrt((y*y+z*z)), z) }  // bug here

Uh-oh - I may be totally mistaken, but isn't that a recursive definition?

I'm not surprised POV-Ray throws up on this one way or the other. Maybe this is
what you actually want:

#declare  F = function(x,y,z) { sqrt((y*y+z*z)) }


Post a reply to this message

From: Warp
Subject: Re: Crashed 3.7 beta 29 using isosurface and sqrt
Date: 31 Dec 2008 05:46:29
Message: <495b4d85@news.povray.org>
clipka <nomail@nomail> wrote:
> "FainAvis" <nomail@nomail> wrote:
> > #declare  F = function(x,y,z) { F(x, sqrt((y*y+z*z)), z) }  // bug here

> Uh-oh - I may be totally mistaken, but isn't that a recursive definition?

> I'm not surprised POV-Ray throws up on this one way or the other.

  OTOH usually POV-Ray has used the principle that a program crash must
never happen, no matter what the input SDL contains...

-- 
                                                          - Warp


Post a reply to this message

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