Q: Help defining a parameterizable function I need a parametrizable function $f$ with domain and codomain $[0..1]$ and parameter $k$ in $[0,1]$ such that:


*

*$f(0)=1, f(1)=0$

*it is concave

*when $k=0$ it is equivalent to $(1-x)$, when $k=1$ it is equivalent to a step function (that is, $f$ in $[0..1)$ is $1, f(1)=0$).


The parameter $k$ should allow smooth morphing between the linear $(1-x)$ function and the step function. Step 3, case $k=1$ can be relaxed....

A: If we swap the rules and say $g(0) = 0$, $g(1) = 1$, then 
$$
g_k(x) = x^\frac{1}{1-k}
$$
works pretty well. It's linear for $k = 0$, and grows to look like $x^2$, $x^3$, etc. as $k$ gets close to one. We  can then "fix" this (to make the values at $0$ and $1$ be what you asked, rather than my swapped values) by defining
$$
f_k(x) = 1 - g_k(x)
$$
which flips the $y$ directions to make it match your goals. 

A: How about a linear blend?
If $g$ is your linear function and $h$ the step function, define $f$ as:
$$
f(x,k) = (1-k)\cdot f(x) + k\cdot g(x)
$$
