The title basically summarizes my question, but the reason I'm asking this is for use as a timing function for a translation in my game.
Thanks in advance!
The title basically summarizes my question, but the reason I'm asking this is for use as a timing function for a translation in my game.
Thanks in advance!
On
Let $$f(x)=ax^3+bx^2+cx+d$$ We know that $$f(0)=0\quad\Longrightarrow\quad d=0$$ $$f(1)=1\quad\Longrightarrow \quad a+b+c+d=1\quad\Longrightarrow\quad a+b+c=1 \quad(1)$$ $$f\left(\frac 12\right)=\frac a8+\frac b4+\frac c2=\frac 12\quad (2)$$ Now, the $x$-coordinate of an inflection point of a curve is a solution of the second derivative of the curve. We have $$f''(x)=6ax+2b=0$$ which has one solution: $$\frac{-2b}{6a}=\frac{-b}{3a}=\frac{1}{2}\quad (3)$$ This leaves us with a system of three equations with three variables. Can you continue?
In general, there will be infinitely many such cubic polynomials: $$f(x) = ax^3 - \frac{3a}{2} x^2 + \frac{a+2}{2} x$$ will satisfy the criteria $f(0) = 0$, $f(1/2) = 1/2$, $f(1) = 1$, and $f''(1/2) = 0$, for any nonzero $a$.