You know those mechanisms that moved or rotated, and then just a few millimeters near the end of the trajectory they oppose a bit of resistance and then clank to the final position.
I want to simulate that clank with an ease function that can be combined with the standard ease actions. The link is for reference to some examples of ease transition functions, but I just need the pseudocode like this:
float clankActionTime(float t) {
if (t > 0.9)
return (0.5*sin(10.0*t*2.0*M_PI)+2.0*10.0*t)/20.0;
return t;
}
That is what I have so far, which gives this graph for t between 0 and 1.
But I want something more like this:
Where A and B are parameters passed to the ease function to indicate where to star the clank and how deep is the valley near the end of the curve, respectively.
t = myfunc(t)
in pseudo code that have a graph like the one in the second image – rraallvv Nov 08 '14 at 00:43