POV-Ray : Newsgroups : povray.advanced-users : Isosurface threshold 0..1 : Re: Isosurface threshold 0..1 Server Time
26 Apr 2024 01:42:19 EDT (-0400)
  Re: Isosurface threshold 0..1  
From: scott
Date: 24 Nov 2016 13:23:37
Message: <58373029$1@news.povray.org>
> Also, I don't really know what I am doing, but taking the abs of each
> component separately seems wrong. Rather, a color should be considered
> "bad" if any of R, G or B are outside 0..1 range.

That is what is happening.

Look at this function, if C is outside the range 0...1 then the result 
will be positive, or "bad". Negative is a "good" output.

#declare fD = function(C) { abs(C-0.5)-0.5 }

Now consider this function, feeding into it three results (some could be 
"bad", some could be "good"):

#declare fDist = function(Dr,Dg,Db) { max(Dr,Dg,Db) }

Here "max" is working like a boolean "or" function. It will return "bad" 
(ie positive) if any of the three parameters are "bad".


Post a reply to this message

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