Function $f(t), 0\leq t\leq 1$ which has a long “toe” and “shoulder”

functions

I'm trying to construct a function that smoothly goes from $f(0)=0$ to $f(1)=1$, and pretty much looks like $e^t-1$ for small $t$, and conversely looks like $1-(e^{1-t}-1)$ for large (close to $1$) $t$. And it should be symmetrical, $f(1-t)=1-f(t)$ with $f(.5)=.5$ at the midpoint. And it would be nice if $f$ had some parameter, call it $k$, that controlled the size of the toe and shoulder regions. That is, something like $k=0$ gives you a straight line $f(t)=t$, up to $k=\infty$ gives you a step function at $.5$ (or anything like that).

Seems like it should be pretty easy to do, but I unexpectedly stymied myself while trying (and I couldn't get google to cough it up, either). This $f$ is just for the $t$-parameter of a bezier curve. I want the curve to stay pretty close to its control-point endpoints for most of the $0\leq t\leq 1$ range, while quickly moving between them during the middle part. So the exact mathematical function isn't particularly important; just the general toe-and-shoulder shape (plus the few other constraints mentioned above).

    E d i t
—————

Thanks, guys, for your comments and answer.

Actually, it's as easy to construct as I'd originally anticipated, but I didn't manage to see it until after I wrote the question. In general, if you just have an $f(t)$ that grows more slowly than linearly, and for which $f(.5)=.5$, then use that for $0\leq t\leq .5$, and simply use $1-f(1-t)$ for $.5\leq t\leq1$. And my question suggests $f(t)=e^t-1$, which we can simply "normalize" so that $f(t)=\frac{e^t-1}{2(e^{.5}-1)}$ is $.5$ at $t=.5$.

But it's even easier choosing $f(t)=t^n/(2(.5^n))=(2t)^n/2$ (integer $n$ not necessary). And here's what that looks like for $n=5$
enter image description here

Best Answer

The gaussian function springs to mind immediately. This is similar to $e^x-1$ for $x \to 0$ and is also symmetric.

enter image description here

The general formula of this function is $$f(x) = ke^{-a(x-b)^2}$$ for the function that I plotted above, $k = 0.5, a = 20$ and $b = 0.5$. $b$ controls the axis of symmetry, $k$ controls the peak height and $a$ controls the overall 'spread' of the function.