I need to implement a non-linear interpolation method between values, lightness, ease, general simplifying curves, and also user-defined curves.
I have a basic idea on how to do this, but I'm not sure if this will be the most effective solution. My idea is basically this:
Use a two-dimensional cubic, quadratic, or nth lowercase Bezier curve to control interpolation. Walk the curve linearly to get the nonlinear component Y, and use it to calculate a simple linear interpolation method:
value = v1 + (v2 - v1) * t;
Where t is the nonlinear Y-component of the control curve.
This allows you to use custom, user-defined methods for interpolation, but at the same time it costs, the cost of one non-linear interpolation is:
1 + 2 * (n-1)
full interpolations, where n is the order or number of control points of the control curve.
I am NOT MATH, this is the best I could come up with, so my question is, is there a better solution?
EDIT: I probably don't explain this correctly, I'm not a native speaker, so here is something, I hope everyone will understand:
