Useful filters, ease curves, s curves

Alec Jacobson

May 07, 2011

weblog/

Curve filters like these are easy to make/tweak as splines, but their trig and polynomial forms are often simpler and easier to use. Use this matlab code:
plot(x,x,x,16*x.^2.*(x-1).^2,x,-cos(x*2*pi)/2+0.5,x,-2*x.^3+3*x.^2,x,-cos(x*pi)/2+0.5,x,2*x.^3-3*x.^2+2*x,x,(asin(x*2-1)/pi+0.5))
To plot each filter:

useful curve filters

Smoothtstep on Wikipedia A followup post about ease curves.