How to create a bezier/cubic simplified animation for offline render?
<p>I have to animate alpha of an element that is being calculated offline. Lets talk about the simple alpha animation. Alpha is zero, alpha grows to 1, stays a while and goes back to zero.</p>

<p>Something like the graph below:</p>

<p><a href="https://i.stack.imgur.com/ONB8T.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ONB8T.jpg" alt="enter image description here"></a></p>

<p>The animations will have different times. I need something that I can give the time (t) and obtain the value (v). </p>

<p>This animation is to be put inside a <code>CIFilter</code> based class and used to animate that filter and because the result of this filter will be calculated offline there is no <code>CALayer</code> to add it on, so using <code>CAKeyframeAnimation</code> or <code>CABasicAnimation</code> is out of question. </p>

<p>If I could use a CALayer, I would do this:</p>

<pre><code>CABasicAnimation* fadeInOut = [CABasicAnimation animation];
fadeInOut.keyPath = @"filters.myFilter.inputRadius";
fadeInOut.fromValue = @(0);
fadeInOut.toValue = @(10);
fadeInOut.duration = 0.2f;
fadeInOut.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut];
fadeInOut.autoreverses = YES;
</code></pre>

<p>But the problem would be this line... there is no layer to add the animation. Like I said I am inside a <code>CIFilter</code> class!</p>

<pre><code>[self.layer addAnimation:fadeInOut forKey:nil]; // NO WAY!
</code></pre>

<p>So, my question is: is there something that can give me the value of time for this kind of curve for the time Interval I define for the animation?</p>