// filtre Hermite 
// f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1

function result = hermiteFilter(value)

  if (value < 0.0) 
     value = -value;
  end;

  if (Value < 1.0) 
     result = (2.0 * value - 3.0) * sqr(value) + 1.0;
  else
     result = 0.0;
  end;

endfunction;