|
|
> 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
|
|