I am looking for an easing equation with the following properties:
It starts at a velocity of zero, and eases into a constant velocity of 1 for a duration of
t_1
seconds (cubic, exp, or quintic, doesn't matter)It then has a constant velocity of 1 for
t_2
seconds.Finally, it eases down to zero velocity for a period of
t_3
seconds.t_1 + t_2 + t_3 = t_max
The function starts at zero and ends at 1.
t_2
will be chosen by the easing function to satisfy (4) and (5), givent_1
,t_3
, andt_max
.
Therefore the function has the form:
float EaseConstantVelocity(float current_time, float t_1, float t_3, float t_max)
{
// ?
}
How do I construct such an easing function?
Edit:
What I'm looking for is conceptually similar to the CubicInOut
function, except in the case of CubicInOut
, t_2
is 0.
SMOOTHSTEP
into a piecewise equation – mklingen Jun 15 '15 at 21:01