2

I am trying to derive a reasonable symmetric interpolant for quadratic $C^0$ interpolation. For odd degrees I have no trouble since things are symmetric. For example for a piecewise cubic interpolant I could define it in each interval $[x_{i-1},x_i]$ to be the cubic polynomial passing through $(x_{i-2},y_{i-2}),\, (x_{i-1},y_{i-1}), \,(x_{i},y_i),\, (x_{i+1},y_{i+1})$. For odd degrees this results in $C^{k-2}$ continuity, where $k$ is the degree of the polynomial. I am aware that I can construct a $C^{k-1}$ interpolant if I additionally solve a linear system of equations, but due to performance considerations I have decided to avoid this.

The issue is that the even degree case is not symmetric. For example I am not sure what constraints would make sense for piecewise quadratic interpolation. If for an interval $[x_{i-1}, x_i]$ I were to take the quadratic polynomial passing through $(x_{i-1}, y_{i-1}),\, (x_i, y_i), \, (x_{i+1},y_{i+1})$ then this emphasizes $(x_{i+1},y_{i+1})$ while it ignores $(x_{i-2}, y_{i-2})$. On the other hand if I were to take the quadratic polynomial passing through $(x_{i-2}, y_{i-2}), \,(x_{i-1}, y_{i-1}),\, (x_i, y_i)$ then this emphasizes $(x_{i-2}, y_{i-2})$ and ignores $(x_{i+1}, y_{i+1})$. Is there some standard approach for constructing a symmetric constraint that doesn't involve solving a system of linear equations for the global piecewise interpolant?

I want the piecewise interpolant in the interval $[x_{i-1}, x_i]$ to pass through $(x_{i-1},y_{i-1})$ and $(x_i, y_i)$, which leaves me with 1 parameter. Ideally I want to determine said parameter symmetrically from both $(x_{i-2},y_{i-2})$ and $(x_{i+1}, y_{i+1})$.

lightxbulb
  • 2,378

2 Answers2

1

The following is not standard, as far as I know, but it might work.

We’re interested in how to construct a quadratic interpolant $Q(x)$ on $[x_{i-1}, x_i]$. Let $z=\tfrac12(x_{i-1} + x_i)$. If we could decide a suitable value for $Q(z)$, we’d be done.

So, let $A(x)$ be the quadratic interpolant through $x_{i-2}, x_{i-1}, x_i$, let $B(x)$ be the interpolant through $x_{i-1}, x_i, x_{i+1}$, and let $Q(z) = \tfrac12 (A(z) + B(z))$.

That’s symmetric, at least.

bubba
  • 44,617
  • Thank you. This seems to be what I was missing. It feels consistent with the Lagrange interpolants that I get for odd degrees. The whole thing of me looking into this was motivated by trying to find higher degree interpolation operators for multigrid. But as you probably have noticed the synthesis functions that arise from just Lagrange interpolation are not very smooth. While B-Splines are as smooth as possible, they require solving a linear system for interpolation. Seems like there are inbetween syntehsis functions that can have higher smoothness and rely only on local information. – lightxbulb Feb 05 '22 at 15:10
  • For example the Keys' synthesis function cited below is $C^1$, and I assume lower than $C^{k-1}$ continuity may be achieved for higher degrees $k$ based on only local information. The best that I could find in that regard was: https://arxiv.org/abs/1611.00618, however it is fairly involved and doesn't provide the formulae in the spatial domain. Anyways I want to thank you again since I also found your answer here: https://math.stackexchange.com/questions/699113/what-is-the-relationship-between-cubic-b-splines-and-cubic-splines very useful. – lightxbulb Feb 05 '22 at 15:13
  • 1
    Well, all piecewise polynomials are b-splines, so b-splines can be as smooth (or as non-smooth) as you like. There are certainly many ways to construct curves from local information, without solving big linear systems. Look up quasi-interpolant, for example. – bubba Feb 06 '22 at 12:13
  • I was referring to the B-Spline synthesis function $\beta_k$ of degree $k$ which can be written as $\beta_k = \beta_{k-1}\beta_0$, where $$ is convolution and $\beta_0$ is the symmetric box function. And if one solves the interpolation linear system it yields $C^{k-1}$ continuity. Do you have any recommendations for resources I could check out on quasi-interpolants? – lightxbulb Feb 06 '22 at 12:18
1

I also tried deriving an interpolating synthesis function by analogy to how it is done in Keys' paper Cubic convolution interpolation for digital image processing. Granted there are multiple choices so I am not claiming that what I derived is the best in any sense of the word.

For a synthesis function (on a regular grid) one typically desires symmetry around $0$, interpolation at the different points, and smoothness.

Taking into account symmetry, it is enough to only consider the intervals $[0,1]$ and $[1,2]$ and fit a quadratic functions within each: $u_1(x) = a_1x^2 + b_1x + c_1$ and $u_2(x) = a_2x^2 + b_2x + c_2$. Then the symmetric versions would have minuses in front of the odd degrees. The interpolating conditions read:

$$u_1(0) = 1, \, u_1(1) = 0, \, u_2(1) = 0, \, u_2(2) = 0$$ $$c_1 = 1, \, a_1+b_1 = -1, \, a_2+b_2+c_2 = 0, 4a_2 + 2b_2 + c_2 = 0$$

I can additionally require that $u_1'(0) = 0$ resulting in $b_1 = 0$ which yields:

$$u_1(x) = -x^2+1.$$

Furthermore I can require that $u_1'(1) = -2 = u_2'(1) = 2a_2 + b_2$. Solving for $a_2, b_2, c_2$ yields:

$$u_2(x) = 2x^2-6x+4.$$

Ultimately the synthesis function is:

$$\phi_2(x) = \begin{cases} -x^2+1 & |x| \leq 1 \\ 2x^2-6|x|+4 & 1 \leq |x| \leq 2 \\ 0 & |x| > 2\end{cases}$$

It has the following shape:

Quadratic synthesis function

The $\frac{1}{2}$ version that bubba suggested results in the synthesis function:

$$\phi_2(x) = \begin{cases} -\frac{1}{4}x^2-\frac{3}{4}|x|+1 & |x| \leq 1 \\ \frac{1}{4}x^2-\frac{3}{4}|x|+\frac{1}{2} & 1 \leq |x| \leq 2 \\ 0 & |x| > 2\end{cases}$$

This seems to match quite well what one should expect from Lagrange interpolating functions (I discuss some details here, also using the idea of bubba Constructing $C^{k−2}$ and $C^{k−1}$ splines on a regular grid through convolution). The shape of the synthesis function is:

enter image description here

lightxbulb
  • 2,378