0

I have variable no of coordinates of a curve lying on it.

The data points range from 50 to 10,000 in number and 1ps(1 pico second) to 10000s in value.

From the given points I have plotted the curve on HTML Canvas. Now I need to find out the Equation of the curve from the data points I have. Equation can be of any degree viz linear, quadratic, qubic.... nth degree.

I have searched over internet and found Interpolation can help. So far have found Lagrange Interpolation and Spline Interpolation.

Could anyone advise me which is the best method to find the equation(may be other than the two mentioned above). Also can Someone please guide me how can I solve these Expressions/Equations in JavaScript as I am not able to Multiply/ Divide the two or more expressions. I need to keep expressions as string or is there any better way of doing so and implementing mathematics.

A third party library could also be helpful but only if it has MIT license.

Sukrit Gupta
  • 438
  • 4
  • 18
  • See [how to draw smooth curve through N points using javascript HTML5 canvas?](http://stackoverflow.com/q/7054272) –  Mar 25 '15 at 14:41
  • HI @Woodface..Tks 4 reply.. Actually I do not only want a smooth curve, I also need to find out the Equation of the Curve so that I can Show it to User of the system. Could you please advise how can I Find the Equation... Currently I am using [newton divided Difference Formula](http://en.wikipedia.org/wiki/Newton_polynomial).I am able to find all the coefficients but not able to solve the equations. like multiplying equation (x-2)*(2x^2+5x+6) and also add them like (2x^4 +6x-7)+ (4x^2-6x^3-2).... Hope you got my prob... My current Code: – Sukrit Gupta Mar 26 '15 at 07:48

0 Answers0