Imagine a function $w_n(x) : R \rightarrow R , n \in N$ such that:

$w_n(x) = 0 , \forall x \notin [-nL, nL], L \in R $

$ 1 = \sum\limits_{k=-\infty}^{\infty} w_n(x - kL), k \in N, \forall x \in R$

I know there are many possible $w_n(x)$ functions. For example, for $ n = 1 $, the triangle function simply works , but I'm looking for smoother functions which work for any n (you can make it work for any n with triangle functions but it's just not smooth).

Also, with the aim of adding a context, I'm doing this because I want to implement a lightfield renderer using this paper . You can see some example functions like the triangle function in page 3, Figure 6:

image from paper[2]

On that picture, you can see that functions $ w_2 $ and $w_3 $ but unfortunately I just don't know which functions are, although they look similar to a variation of $ {sin (\pi x) \over \pi x } {1 \over 1 + |x|^2 } $

What kind of functions $w_n$ do you know and what is their name so that I can look them up?


I've been thinking about this and I think I have at least an answer on how to build $ w_n (x) $ functions.

First, I have to argue why the $ sinc(x) $ function and its variations are quite nice. The following will assume L = 1. Let's define a sample function:

$ sample(x, func) = \sum\limits_{k=-\infty}^{\infty} w_n(x - k) $

If we use the bare $ sinc(x) $, without limiting it with $ rect(x/M) $, then:

$ sample(x, sinc) = 1, \forall x \in R $

So, in the limit ($ n \rightarrow \infty$), the $ sinc(x) $ function is what we want. But what happens if we limit it with $ f(x) = sinc(x) rect(x /6)$?

Then $ sample(x, f) \neq 1, \forall x \in R$ , but it's somewhat close, as you can see:


So the sample function oscillates between 1 and 1.1. Now the idea is simply to "normalize" f by dividing it by the sample function!

$ f(x) = sinc(x) rect(x /6)$

$ g(x) = { f(x) \over sample(x, f) } $

In this picture you can see the difference between f and g:

enter image description here

EDIT: I've found out that while the previous explanation works, a smoother and well-known function is the Lanczos kernel:

$ k(x) = sinc(x) sinc({x \over a}) rect({x \over 2a}) $

The lanczos kernel also has the property $ 1 = sample(x, k) $


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.