# How would I create a exponential ramp function from 0,0 to 1,1 with a single value to explain curvature?

I need an exponential function that will take linear input from 0,0 to 1,1 and give me back an exponential shaped curve such that changes in X near the 0 point result in small increases in Y, but each step increases as X gets closer to 1.

Similar to the solid line in this graph:

But I'd like to be able to control the curvature with a single value similar to how the gamma correction slider works, but making sure 0,0 and 1,1 are always on the curve.

Thanks!

-
But $(0,0)$ and $(1,1)$ already are always on the gamma correction curve $y=x^\gamma$. You want the function to involve $e^x$ instead of $x^\gamma$, is that it? –  Rahul Feb 8 '13 at 4:59
@ℝⁿ Correct, sorry if that wasn't clear. –  user61442 Feb 8 '13 at 5:04

A few options: \begin{align} y&=x^\gamma&\text{for}&\gamma\in[1,\infty),\\ y&=\frac{e^{kx}-1}{e^k-1}&\text{for}&k\in(0,\infty),\\ y&=\frac x{1+a(1-x)}&\text{for}&a\in[0,\infty). \end{align} I guess you want the one in the middle.
We start with the usual function for exponential growth, $f(x)=e^{kx}$. We'll take $y$ to be to be an affine transformation of it, $y(x)=af(x)+b$, which is the simplest transformation that can fit two specified points. Imposing $y(0)=0$ and $y(1)=1$ gives us two equations which we can use to solve for $a$ and $b$, yielding (after some simplification) the above result.
(This is the general approach. The quick-and-dirty shortcut I actually took was to start with $e^{kx}$, subtract the value at $0$, divide by the value at $1$, and then plot it to make sure I didn't screw anything up.)
I think the third example should have numerator $(1+a)x$, since as it stands, when $x=1$, the value is not 1. –  Daryl Feb 8 '13 at 6:14
@Daryl: I think you are mistaken. $\left.\dfrac x{1+a(1-x)}\right|_{x=1}=\dfrac1{1+a(1-1)}=\dfrac1{1+0}=1$. –  Rahul Feb 8 '13 at 6:17