# Can one define new interpolation types for F-curves?

I'd be happy if there were a way to define a new interpolation type (beyond constant, linear, and Bezier) for F-curves - let's call it ballistic and it is in fact "just" a special case of the Bezier type: If the current keyframe is of that new type ballistic and is at time $$t_1$$ and Z location $$z_1$$, and the next keyrame is at $$t_2$$ and $$z_2$$, then I would like to automatically adjust the right handle of the current and the left handle of the next keyframe to produce a parabola as would be produced by gravity, with the given starting and ending position

The math to use is not complicated (for those who are interested: the right handle of the current keyframe must be at $$t=\frac{2t_1+t_2}{3}$$ and $$z=\frac{2z_1+z_2}{3}+h$$, the left handle of the next keyframe must be at $$t=\frac{t_1+2t_2}{3}$$ and $$z=\frac{z_1+2z_2}{3}+h$$, where $$h=c\cdot(t_2-t_1)^2$$ and the constant $$c$$ depends on scene settings such as frame rate, units/scale, gravitational constant). If it were only for once, the calculations could easily be done by hand. But doing this for numerous keyframes, and redoing the calculations whenever you decide to modify the keyframes involved, is as boring as it is error-prone. A special interpolation type that automatically performs (and re-performs) such calculations would come in handy.

Hence the question: Is there a way to define such a new interpolation type?