The sketch allows you to click on the canvas to add an (x, y) point. Then a matrix is constructed and solved, which gives the coefficients of a polynomial that passes through all of data points. Program may run into numerical stability issues if number of data points is large.
Example: