
Ease In, Out: The Sigmoid Factory - SapphireSun
https://medium.com/analytic-animations/ease-in-out-the-sigmoid-factory-c5116d8abce9#.mr9450jck
======
static_noise
I'd probably prefer

0.5-0.5 _cos(pi_ t/T)

to a function which has a nonzero derivative at the start at the end.

~~~
SapphireSun
Hmm, that does work nicely. The major problem with it though is that I don't
see an easy way to configure the steepness. I suppose you can force it to 0
and 1 before and after the first rise. Not a terrible solution, a bit less
elegant though, but as you said it does have a nice zero velocity at the
starts and ends.

~~~
static_noise
Instead of

    
    
      cos(...) 
    

you could use

    
    
      pow( cos(...), a )
    

where a can be used to adjust the steepness.

I can't plot it right now and I think I'm missing something, but you get the
general idea of using the power of a function which goes form 0 to 1 to adjust
steepness.

Another solution would be a 2-piece function kind of

    
    
      0.5*pow( 2*t/T, a ) for t < T/2
    

and

    
    
      1-0.5*pow( 2*(1-t/T), a ) for t > T/2
    

which makes a similar slope as the cosine but is easier to calculate.

