1
votes

I know it is possible to specify the timing function of a CAAnimation with a cubic bezier curve using:

CAMediaTimingFunction

But, is it possible to specify the timing function with a quadratic bezier curve?

Why I want this?, you may ask. Well, is either that or concatenate a couple of animations in order to achieve the motion path I'm looking for.

1

1 Answers

0
votes

Any Bézier curve can be exactly represented by another Bézier curve of a higher degree in a process called degree elevation. Wikipedia has a nice overview of the method with an example of elevating a quadratic to cubic Bézier curve.

Assuming the control point of quadratic curve fits inside [0, 1] box the corresponding cubic curve should be representable as a CAMediaTimingFunction.