POV-Ray : Newsgroups : povray.unofficial.patches : bicubic interpolation patch : Re: bicubic interpolation patch Server Time
28 Sep 2024 16:45:34 EDT (-0400)
  Re: bicubic interpolation patch  
From: Lutz-Peter Hooge
Date: 11 Jun 2003 10:32:08
Message: <3ee73d68$1@news.povray.org>
gk <g_k### [at] mail333com> wrote:

>  >* DESCRIPTION
>  >*    calculates the interpolation between f[1] and f[2] at position x
>  >*    using the cubic function given by:
>  >*
>  >*                       ( [-0.5  1.5 -2.5  0.5 ]   [f[0]] )
                                          ^^^
Typo. Should read -1.5.


> >        DBL val;
> >        val=(-0.5*f[0] + 1.5*f[1] - 1.5*f[2] + 0.5*f[3])*x*x*x
> >           +( 1.0*f[0] - 2.5*f[1] + 2.0*f[2] - 0.5*f[3])*x*x
> >           +(-0.5*f[0]            + 0.5*f[1]           )*x
                                           ^^^^

Aargh. :-/
Another Typo. Should be f[2]. Indentation is correct here.

Lutz-Peter


Post a reply to this message

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