POV-Ray : Newsgroups : povray.beta-test.binaries : isosurface contained_by or evaluation problem Server Time
16 May 2024 04:35:48 EDT (-0400)
  isosurface contained_by or evaluation problem (Message 1 to 10 of 10)  
From: Pierre Pruvost
Subject: isosurface contained_by or evaluation problem
Date: 6 Oct 2001 04:33:11
Message: <3bbec1c7@news.povray.org>
Hello,

I notice a problem with contained_by or an evaluation problem
with a very regular isosurface of deg 6 ( x^n+y^2+z^2-1.5).

With n = 4 and a contained_by box <-3,3> the surface is present.
    see deg4_cont.bmp

With n = 6 the surface disappears completely .
    see deg6_contbig.bmp

With n= 6 and a smaller container box<-2,2>, the surface appears
    see deg6_contb2.bmp


Post a reply to this message


Attachments:
Download 'deg4_cont.bmp.dat' (57 KB) Download 'deg6_contbig.bmp.dat' (57 KB) Download 'test02.pov.txt' (3 KB) Download 'de6_contb2.bmp.dat' (57 KB)

From: Warp
Subject: Re: isosurface contained_by or evaluation problem
Date: 6 Oct 2001 04:35:42
Message: <3bbec25e@news.povray.org>
Could you please post images in PNG format, not BMP?
  PNGs are much smaller and better supported accross platforms/newsreaders.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Pierre Pruvost
Subject: Re: isosurface contained_by or evaluation problem
Date: 6 Oct 2001 04:41:22
Message: <3bbec3b2@news.povray.org>
The evaluation version is beta 4


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: isosurface contained_by or evaluation problem
Date: 6 Oct 2001 06:00:55
Message: <3bbed657@news.povray.org>
This seems to be just another max_gradient affair. If you set it to 160 (80
was not enough) the Iso will show up. My testrender is now at 80% and
everything seems to be okay.
If you narrow the contained_by-object, the samples Pov takes with a given
max_gradient and accuracy will be not that far apart and this will lead to a
more accurate isosurface. For this it's always a good idea to bound the iso
as narrow as possible.

Marc-Hendrik


Post a reply to this message

From: Mike Williams
Subject: Re: isosurface contained_by or evaluation problem
Date: 6 Oct 2001 08:57:18
Message: <z9IXyLAY9vv7Ew5H@econym.demon.co.uk>
Wasn't it Pierre Pruvost who wrote:
>Hello,
>
>I notice a problem with contained_by or an evaluation problem
>with a very regular isosurface of deg 6 ( x^n+y^2+z^2-1.5).
>
>With n = 4 and a contained_by box <-3,3> the surface is present.
>    see deg4_cont.bmp
>
>With n = 6 the surface disappears completely .
>    see deg6_contbig.bmp
>
>With n= 6 and a smaller container box<-2,2>, the surface appears
>    see deg6_contb2.bmp
>

The actual gradient of a polynomial function in the order of n*x^(n-1).
So the sort of gradients that you'll encounter at the edges of your
container change something like this:

n=4, container <-3,3>, gradient 4*3^3 = 36
n=6, container <-3,3>, gradient 6*3^5 = 1458
n=6, container <-2,2>, gradient 6*2^5 = 192

Because your max_gradient is set *way* too low, the solver simply
evaluates the function at the edges of the container. It believes the
value of max_gradient that you've given it and knows that the nearest
surface point can't be closer than
 (calculated_value - threshold) / max_gradient
so there are "obviously" no surface points within the box.

You happen to be getting away with max_gradient = 40 in the <-2,2> case
because the solver determines that it needs to look for the surface
somewhere in the middle, and once it gets near the middle of the box the
gradients are much lower.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Christoph Hormann
Subject: Re: isosurface contained_by or evaluation problem
Date: 6 Oct 2001 09:22:31
Message: <3BBF0674.D0444328@gmx.de>
Mike Williams wrote:
> 
> [...]
> 
> The actual gradient of a polynomial function in the order of n*x^(n-1).
> So the sort of gradients that you'll encounter at the edges of your
> container change something like this:
> 
> n=4, container <-3,3>, gradient 4*3^3 = 36
> n=6, container <-3,3>, gradient 6*3^5 = 1458
> n=6, container <-2,2>, gradient 6*2^5 = 192
> 
> Because your max_gradient is set *way* too low, the solver simply
> evaluates the function at the edges of the container. It believes the
> value of max_gradient that you've given it and knows that the nearest
> surface point can't be closer than
>  (calculated_value - threshold) / max_gradient
> so there are "obviously" no surface points within the box.
> 

Ahhh!

Sometimes you don't see the obvious even if it's right in front of you...
(see also p.b.i.)

So it's important to say that the max_gradient value should be larger than
the gradient *everywhere* in the container, not only near the actual
surface.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Ken
Subject: Re: isosurface contained_by or evaluation problem
Date: 6 Oct 2001 10:55:26
Message: <3BBF1CB7.79699457@pacbell.net>
Warp wrote:
> 
>   Could you please post images in PNG format, not BMP?
>   PNGs are much smaller and better supported accross platforms/newsreaders.

Actually I prefer jpgs. I have to open png's in a seperate program to
view them.

-- 
Ken Tyler


Post a reply to this message

From: Mike Williams
Subject: Re: isosurface contained_by or evaluation problem
Date: 7 Oct 2001 00:36:10
Message: <h$izSBAxt9v7EwaK@econym.demon.co.uk>
Wasn't it Christoph Hormann who wrote:

>So it's important to say that the max_gradient value should be larger than
>the gradient *everywhere* in the container, not only near the actual
>surface.  

If the solver knew where the actual surface was, then it wouldn't need
to be told the max_gradient.

Note also that there are some functions that have regions where the
actual gradient is infinite, but you can often get away with setting a
smaller value for max_gradient.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Christoph Hormann
Subject: Re: isosurface contained_by or evaluation problem
Date: 7 Oct 2001 04:48:15
Message: <3BC017B2.DEBF4A87@gmx.de>
Mike Williams wrote:
> 
> If the solver knew where the actual surface was, then it wouldn't need
> to be told the max_gradient.
> 

I know, but it could be changed to do additional steps (meaning higher
max_gradient) if the evaluated function values differ very much from the
threshold value.  Alternatively it could also generate a warning if the
gradient is obviously higher than max_gradient and if there can't be a
visible surface with the specified max_gradient (like in this case)

> Note also that there are some functions that have regions where the
> actual gradient is infinite, but you can often get away with setting a
> smaller value for max_gradient.
> 

Although if the gradient is infinite 'across the threshold value' like
when you use a checker pattern etc. with threshold 0.5 you will most
likely not be able to totally avoid artefacts.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Pierre Pruvost
Subject: Re: isosurface contained_by or evaluation problem
Date: 7 Oct 2001 15:39:48
Message: <3bc0af84@news.povray.org>
Thanks !


>
>The actual gradient of a polynomial function in the order of n*x^(n-1).
>So the sort of gradients that you'll encounter at the edges of your
>container change something like this:
>
>n=4, container <-3,3>, gradient 4*3^3 = 36
>n=6, container <-3,3>, gradient 6*3^5 = 1458
>n=6, container <-2,2>, gradient 6*2^5 = 192
>
>Mike Williams
>Gentleman of Leisure


Post a reply to this message

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