I am trying to develop a widget that helps you define a function visually. So you could add various points on a graph and have the whole function for each x be calculated based on these points.
If I apply quadratic or cubic smoothing I would get:
a and b are easily calculated and even values in between with simple linear interpolation.
How would I calculate a' and b'?
(In the drawings, placement of a, b, a', b' looks like they are values of x, but they are actually supposed to be f(x) at points marked with a cross on the curve)

