POV-Ray : Newsgroups : povray.unofficial.patches : iso-bug (yet again) Server Time
2 Sep 2024 04:17:44 EDT (-0400)
  iso-bug (yet again) (Message 1 to 3 of 3)  
From: hall
Subject: iso-bug (yet again)
Date: 4 Jul 2000 13:01:21
Message: <39621861@news.povray.org>
Well, looking at the Intermediate Isosurface tutorial (good stuff), I was
able to narrow down the problem (or what I think is a problem) with
rendering isosurface spheres with MegaPOV (see my earlier post) to the
rendering method (1 or 2) that was used.  It seems that using a declared
function in a isosurface, which I learned from the aforementioned tutorial,
causes the rendering method 2 to be used by default.  (Is this in the
MegaPOV doc's?  I guess I should read them thoroughly instead of picking out
bits and pieces)  And method 2 does not like the function x*x+y*y+z*z for
whatever reason.  I am listing the source code below for a couple of
spheres, differing by rendering method 1 or 2 alone below--> the method 2
sphere does not appear.  Needless to say, I will be using method 1
exclusively for the time being.  Hope this info will help,

Quadhall
tre### [at] ww-interlinknet

P.S.  Isosurfaces still rule!
P.P.S.  The programmers who brought us POV and MegaPOV rule even more!

the code:

#version unofficial MegaPOV 0.5;
light_source { <3,5,-8> 1 shadowless}
camera{ location  <0,0,-4> look_at   <0,0,0> }

#declare a = function { x*x+y*y+z*z }

isosurface
{
 function {a(x,y,z)}
 contained_by{sphere {0,4}}
 threshold 1
 method 1
 eval
 pigment{color rgb 1}
 translate <-1,0,0>
}

isosurface
{
 function {a(x,y,z)}
 contained_by{sphere {0,4}}
 threshold 1
 method 2
 eval
 pigment{color rgb 1}
 translate <1,0,0>
}


Post a reply to this message

From: Tom Melly
Subject: Re: iso-bug (yet again)
Date: 6 Jul 2000 04:12:42
Message: <39643f7a$1@news.povray.org>
"hall" <tre### [at] ww-interlinknet> wrote in message
news:39621861@news.povray.org...
> the code:
>
> #version unofficial MegaPOV 0.5;
> light_source { <3,5,-8> 1 shadowless}
> camera{ location  <0,0,-4> look_at   <0,0,0> }
>
> #declare a = function { x*x+y*y+z*z }
>
> isosurface
> {
>  function {a(x,y,z)}
>  contained_by{sphere {0,4}}
>  threshold 1
>  method 1
>  eval
>  pigment{color rgb 1}
>  translate <-1,0,0>
> }
>
> isosurface
> {
>  function {a(x,y,z)}
>  contained_by{sphere {0,4}}
>  threshold 1
>  method 2
>  eval
>  pigment{color rgb 1}
>  translate <1,0,0>
> }
>

Try adding  a max_gradient value - eval should give you the right(ish) val,
but check the output of eval on subsequent renders to get the final correct
val for max_gradient. I had exactly the same problem.


Post a reply to this message

From: Chris Huff
Subject: Re: iso-bug (yet again)
Date: 6 Jul 2000 06:27:00
Message: <chrishuff-8BCF33.05271306072000@news.povray.org>
In article <39621861@news.povray.org>, "hall" 
<tre### [at] ww-interlinknet> wrote:

I believe your problem is here...

> #declare a = function { x*x+y*y+z*z }

and here...
>  function {a(x,y,z)}
>  contained_by{sphere {0,4}}

Your function "a" increases exponentially from < 0, 0, 0>, and the 
contained_by object goes far outside the actual surface, so a high 
max_gradient is required, and calculation is slower. Try using 
"sqrt(sqr(x), sqr(y), sqr(z))". The sqr() should be a little faster than 
x*x, and the sqrt() will make it a linear increase.

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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