In graphics, we often need a way to filter or smoothen out a signal. Below is a collection of some functions that can be used to do that along with their respective plots. The input signal x is assumed to be in the [-1, 1] value range:

\(1.0 - |x|^a\)

a = 0.5 01
a = 1.0 02
a = 2.5 03
a = 5.0 04
a = 25.0 05

\(cos(\frac{\pi * x}{2.0})^a\)

a = 0.5 06
a = 1.0 07
a = 2.5 08
a = 5.0 09
a = 25.0 10

\(1.0 - |sin(\frac{\pi * x}{2.0})|^a\)

a = 0.5 11
a = 1.0 12
a = 2.5 13
a = 5.0 14
a = 25.0 15

\(min(cos(\frac{\pi * x}{2.0}), 1.0 - |x|)^a\)

a = 0.5 16
a = 1.0 17
a = 2.5 18
a = 5.0 19
a = 25.0 20

\(1.0 - max(0.0, |x| * 2.0 - 1.0)^a\)

a = 0.5 21
a = 1.0 22
a = 2.5 23
a = 5.0 24
a = 25.0 25