[kdenlive] Plot of the Anim Keyframes curve

Dan Dennedy dan at dennedy.org
Thu Jul 30 18:09:11 UTC 2015


On Thu, Jul 30, 2015 at 6:07 AM Gurjot Singh Bhatti <bhattigurjot at gmail.com>
wrote:

> On 24 July 2015 at 22:43, Dan Dennedy <dan at dennedy.org> wrote:
> > Another challenge is to figure out how to represent MLT's Catmull-Rom
> spline
> > curves using the API's Bezier curve functions. I do not have a solid
> answer
> > for that, but I did bookmark this link a while ago:
> >
> http://www.antigrain.com/__code/include/agg_curves.h.html#catrom_to_bezier
> > I have not fully analyzed that yet, and I would need to study the topic
> more
> > to do something with it.
>
> Can I get these catmull-rom points from the mlt_keyframe_spline
> keyframe somehow (MLT API)?
>

No, because the beauty of Catmull-Rom is that there are no additional
control points. It is automatically the smoothest curve fitted to a set of
data points: your keyframes' time position and value. We just need to
figure out how to emulate this using a Bezier curve, but I have not been
able to look into this deeply.

I did a Google search on "simulate catmull-rom using bezier." A search
result led me to this nice article:
http://schepers.cc/getting-to-the-point
In it he refers to the same Anti-Grain Geometry code I referred to. :-)
However, it looks like he also pulled it together into a concise, more
readable javascript version.

Also, see this comment in the MLT code about how additional points before
the first and after the last are needed:
https://github.com/mltframework/mlt/blob/master/src/framework/mlt_property.c#L1072
The code following that (mlt_property_interpolate) handles transitions
between different types of interpolation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdenlive/attachments/20150730/0ca3fe7c/attachment.html>


More information about the kdenlive mailing list