POV-Ray : Newsgroups : povray.general : CSG difference of isosurfaces : Re: CSG difference of isosurfaces Server Time
26 Apr 2024 07:29:55 EDT (-0400)
  Re: CSG difference of isosurfaces  
From: omniverse
Date: 13 Nov 2016 10:55:01
Message: <web.58288c14edf187fc9c5d6c810@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 11/12/2016 12:39 PM, omniverse wrote:
> > William F Pokorny <ano### [at] anonymousorg> wrote:
> >> #declare FnShell = function (x,y,z) {
> >>      max(Fn00(x,y,z),Fn00_inv(x,y,z))
> >> }
> >
> > Goes to show just how little I understand, I don't see how max(V1,V2) produces
> > anything but a single value for the next function. Hence, how could it create
> > both outer and inner surfaces?
> >
> I think about this particular set up as follows.
>
> In FnShell(), max() is returning the most positive value for all sampled
> points within the isosurface container. Further, these samples are
> always along the rays being traced(1) within the container.
>
> The maximum value of the two functions has been set up to be negative(2)
> only in the region where you see the shell. Creating the shell of
> negative values is achieved by setting up the right kind of return value
> overlap for the regular and inverted forms of the function used in
> max(). Specifically, by making both regular and inverted forms of the
> function slightly more negative by half a "thickness" value.
>
> Bill P.
>
> (1) When looking at function values as used in an isosurface I find it
> easier sample as if following along some ray withing the container. Or
> to look at a set of samples within a plane of values within the
> container. There are vector analysis functions in math.inc, complements
> of Christoph Hormann and Tor Olav Kristensen, which can be of help here.
>
> (2) Surfaces form on the transition from positive values to negative and
> visa versa due the threshold of 0. We get a surface entering the
> negative shell of values and another on exit while moving along each ray
> passing through the negative region of values.

I feel dumb. Well of course the function evaluates to more than a single point,
or vector, as the ray is traced. But I'm still going to have to wrap my head
around what you're saying. Thanks Bill!


Post a reply to this message

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