POV-Ray : Newsgroups : povray.newusers : isosurface problem : Re: isosurface problem Server Time
4 Nov 2024 17:45:05 EST (-0500)
  Re: isosurface problem  
From: R  Suzuki
Date: 4 Feb 2002 05:34:57
Message: <3c5e63d1@news.povray.org>
<pet### [at] somewhereinuk> wrote
>>isosurface { function {
>>               max(-1,
>>                   -(f_bfield(x,y,z,velx,vely,velz) - 6)
>>               )
>>                  }
>
>I admit I don't get this at all.
>
>I notice I can take the max() part out (is it some kind of
>error trap?), leaving the function definition as just
>
>       -(f_bfield(x,y,z,velx,vely,velz) - 6)
>
>and I can change this to
>
>        6 - f_bfield(x,y,z,velx,vely,velz)
>
>and it still works.

The max() and evaluate are tips for faster rendering.
You don't need them if the rendering speed is acceptable for you.

Without the max(), the maximum gradient of the function 
is extremely high.  It slows down rendering.


> But
>
>        f_bfield(x,y,z,velx,vely,velz) - 6
>
>(as in my original) doesn't work.
>
>I thought that the surface would be drawn where the function becomes
>zero, but then if 6 - f_bfield() is zero then f_bfield() - 6 should be
>zero too! So I don't understand why this change makes such a
>huge difference.

Because the isosurface is not a surface object---it is a solid object
by default.  If you want to see only the surface of your original 
function, you should add 'open' keyword. (see POV-Help 6.5.4.1)

>>        evaluate 10,1.1,0.99
>
>I'll have to look this one up in the docs, too, since it sounds
>fundamental, and I've no idea what it's doing!

Well, this is the dynamic max_gradient estimation technique and
it has not been documented yet.  See my messages
http://news.povray.org/3bd7f6e8$1@news.povray.org
http://news.povray.org/3be10cf9@news.povray.org

This technique is effective in this case because large gradient 
values are located in a small region and the gradient changes smoothly.

>Many thanks for the speedy and very helpful reply.

You are welcome.

R. Suzuki


Post a reply to this message

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