POV-Ray : Newsgroups : povray.advanced-users : Isosurface math questions : Re: Isosurface math questions Server Time
30 Jul 2024 06:25:43 EDT (-0400)
  Re: Isosurface math questions  
From: Chris Huff
Date: 16 Dec 1999 19:55:58
Message: <chrishuff_99-87E76F.19563216121999@news.povray.org>
In article <385981B6.2B077A4C@isd.net>, lfo### [at] isdnet wrote:

> > With the + and - operators. :-)
> > If you have two functions that are #defined, say MyFuncA and MyFuncB, 
> > do
> > something like
> > function {MyFuncA(x, y, z) + MyFuncB(x, y, z)}
> 
> If I have three torus functions, on the x-y, x-z, and y-z planes, then a
> point p might be 3 units from one circle and 1 unit from another and 6 
> units
> from another and have a value of 10 and that doesn't do what I want it 
> to,
> combine functions like they were unioned or isoblobbed.

To union functions, use the boolean OR operator(|) between the functions.
To make them blob together, you have to make them into density 
functions, try using min and max to clamp the values into a specific 
range. Here is a useful function for doing this:

#declare clamp = function {min(y, max(x, z))}
clamp(value, minimum, maximum)
Clamps the value to the range [minimum, maximum]. Can only be used in 
isosurface functions and function pigments.

But really, this is what the isoblob object was designed for, why not 
use it? It is included in MegaPOV.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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