FILTER_SAMPLES
if (i < FILTER_SAMPLES || i > samples - FILTER_SAMPLES) {
if (i > FILTER_SAMPLES)
filter = (double)fi / FILTER_SAMPLES;
pow((double)(FILTER_SAMPLES - fi) /
FILTER_SAMPLES, 2));
filter = (1 + cos(M_PI * (FILTER_SAMPLES - fi) / FILTER_SAMPLES)) / 2;