Hello.
I am trying to write a program that can approximate graphs I might have with polynomials. With this I mean that I have a picture of a graph, that I don't know the equation for, and I want to draw larger and larger polynomials until I get an "acceptable" match.
Would this be possible? I guess I would need a starting value i.e. the center of the graph, and some user input as to whether it gets better or worse.
Or even some way of tracing/drawing on the graph, collecting the coordinates and then finding the function?
Now, I know how I could approximate a known function i.e. with Taylor series, but as I stated I would not know the function.
approximating graphs with polynomials
Started by mordi05, Nov 04 2008 02:16 PM
3 replies to this topic
#1
Posted 04 November 2008 - 02:16 PM
|
|
|
#2
Posted 05 November 2008 - 08:11 AM
If you have sufficient data points, I would use Cubic Splines to create the approximations. Taylor polynomials work well locally, but tend to be pretty bad short distances away from the area of interest. This is a common problem with any polynomial of high degree.
#3
Posted 05 November 2008 - 09:40 AM
Thank, you. That makes sense. I will certainly look into it.
Of course I would not know the coordinates of each point point on the graph initially. Only approximately what they are from looking at the graph. However, I think I could solve this be inputting the scale on the axis, and some kind of mouse click in the data points to collect pretty accurate coordinates.
Of course I would not know the coordinates of each point point on the graph initially. Only approximately what they are from looking at the graph. However, I think I could solve this be inputting the scale on the axis, and some kind of mouse click in the data points to collect pretty accurate coordinates.
#4
Posted 05 November 2008 - 02:30 PM
Since a cubic spline is an approximation, that should work well.


Sign In
Create Account

Back to top









