One way to do this is polynomial interpolation: For n given points there is a unique polynomial p(x) of degree ≤n-1 passing through the points.
You can move the points around with the mouse.
Note: The interpolating polynomial can have large oscillations.