|
|
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.
Post a reply to this message
|
|