Following the discussion in povray.binaries.images under the same
subject, here is my implementation of the bicubic interpolation.
The archive contains a scene file with the macro used for the
interpolation (could probably easily put in an include file if need be)
and an example TGA height field to test it on.
The implementation here is quite slow because it uses many function
calls. On the other hand, you could probably tweak it to have
interesting effects (for example by twisting the slope computation...).
Anyhow it is quite necessary when you want to blend image data with
procedural patterns in POV-Ray, because the internal interpolation
methods are more visible. I sure hope to see a similar internal method
in future official versions of POV-Ray...
And my thanks to Samuel for making me rediscover and clean up my old
code ;-)
Regards
--
Vincent
Post a reply to this message
Attachments:
Download 'interpolation.zip' (8 KB)
|