Two Dimensional Lagrange Interpolation

Click and drag control points. Double click on a control point to remove it. Double click on an empty space to add a control point.

Your browser doesn't seem to support the necesary html5 features ):
To achieve Lagrange interpolation of two dimensional values, the above is independantly calculating the X axis value and the Y axis value. It uses the the lagrange interpolation f(x) function to make two f(t) functions where one function controls the x axis and the other function controls the y axis. The control point's index in the control point array is what determines the t value for that control point. Note that this causes the control points to be evenly spaced in t, but that isn't a requirement of Lagrange interpolation, it's just what I went with because it was easier than making another control to let you control the t parameter per control point. Sorry, that would kind of be a cool feature, I know!