POV-Ray : Newsgroups : povray.unofficial.patches : bicubic interpolation patch : Re: bicubic interpolation patch Server Time
28 Sep 2024 16:52:40 EDT (-0400)
  Re: bicubic interpolation patch  
From: Christopher James Huff
Date: 10 Jun 2003 21:17:41
Message: <cjameshuff-C6D655.20091410062003@netplex.aussie.org>
In article <3ee67833$1@news.povray.org>,
 Lutz-Peter Hooge <lpv### [at] gmxde> wrote:

> 1) It is enabled with "interpolation 3"
> In image.h this is/was mapped to CUBIC_SPLINE, but wasn't implemented
> until now. Now the question is: is bicubic interpolation the same as 
> cubic spline interpolation? Should interpolation 3 be used for 
> bicubic, or should it be leaved reserved for some other interpolation?

I'd just use type 3 for bicubic. If something else was originally 
planned, it was so long ago that it makes no difference, and it fits in 
with existing ones nicely. (similarly, light sources used to have a 
"track" keyword, but it never did anything)

Another nice patch would be to allow keywords to be used instead of 
numeric identifiers.


> 2) cubic interpolation can possibly return values outside the
> [0..1] range.
> Do these values need to be clipped? IMHO not for values >1 (colors >1
> are allowed anyway), but what about <0?
> Do I have to worry about this, or are the values already clipped 
> somewhere else where needed?

I would leave them unclipped. Code that needs clipped values will clip 
them itself, intermediate values that go out of the usual range are fine.


> 3) Currently the matrix with determines the coefficients for the
> cubic interpolation function is hardcoded. Would it make sense
> to let the user specifiy a different one?
> 
> for example like this:
> image_map
> {
>   sys "somepic"
>   interpolation 3
>   matrix <-0.5,  1.5, -1.5,  0.5,
>            1.0, -2.5,  2.0, -0.5,
>           -0.5,  0.0,  0.5,  0.0,
>            0.0,  1.0,  0.0,  0.0>
> }

Are those coefficients random? I can't figure out any order to them.
Maybe this would have some use, but can't think of any. Any special 
effects this makes possible?

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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