|
|
Nathan Kopp <Nat### [at] koppcom> wrote:
: Yes. When turning a pattern (3d potential function with an output range of
: 0..1) into a bump map, POV uses a pyramid of four (I think) sample points to
: determine the gradient of the function.
Wouldn't it be faster to calculate the normal of a (pattern) function using
its derived versions (d/dx, d/dy and d/dz)? This way only three functions
have to be calculated instead of four. If it's a 2D function only two
functions has to be calculated. If it's a 1D function (like gradient), only
one function has to be calculated.
(Povray doesn't have to calculate the derived functions itself; they are
of course hard-coded as the original functions themselves.)
Of course it's a bit difficult to calculate the derived of an iterative
function (like mandel), but for some other (non-iterative) functions it
should be possible and even easy.
Or is this already done this way?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|