POV-Ray : Newsgroups : povray.general : Isosurface help : Re: Isosurface help Server Time
30 Jul 2024 12:31:33 EDT (-0400)
  Re: Isosurface help  
From: Mike Williams
Date: 23 Jan 2009 12:20:06
Message: <Qm8SPnCMqfeJFwfd@econym.demon.co.uk>
Wasn't it Kenneth who wrote:
>Mike Williams <nos### [at] econymdemoncouk> wrote:
>
>> First: Eliminate the Threshold value by subtracting 1 in the function {}
>>         function {P(x*2,y*(1.05-y/6),z*2) -1}
>>
>
>Hi, Mike...
>
>I was wondering about the reason for that, in functions P1 and P2. I see that
>it's a kind of alternate way to create 'smoothe transits' between the two
>spheres; but I'm curious if it has some added benefit that the docs' version
>doesn't (speaking from sheer lack of understanding on my part.) The docs'
>version produces a final composite object that does look a bit different from
>yours--a smaller main sphere--but I can adjust that by making its radius
>larger. Can you clue me in on why you've used an alternate technique? I'm most
>curious! :-)

Eliminating threshold doesn't have any effect on the geometry, it just
makes the maths easier.

The surface exists at all points where f(x,y,z) = threshold. So
   function {P(x*2,y*(1.05-y/6),z*2)}
   threshold 1
is exactly the same as
   function {P(x*2,y*(1.05-y/6),z*2) -1}
   threshold 0
but now we can handle functions that are complicated expressions of P()
without also having to have complicated expressions of the threshold
value.

>While we're on this topic: Something else I don't quite understand is why
>*either* technique requires such a high max_gradient, when the resulting object
>is just a smooth shape with no *apparent* sharp indents or other
>difficult-to-evaluate slopes.

It's not the sharpness of the surface, but the rate of change of
function that causes the max_gradient requirement. For example
  function {x*x + y*y + z*z - 1}
and
  function {x*x*x*x + y*y*y*y + z*z*z*z - 1}
produce identical surfaces, but the values of the second one rise more
steeply, so there's a high max_gradient.

>And would max_gradient's 'evaluate' be better to use on such composite
>functions?

Probably. I never mastered evaluate.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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