Here is the issue:
I have a set of x,y coordinates that plots a generic curve. What I need to do is determine additional x,y coordinates that are located midway between existing coordinates. For now I will assume that any three consecutive points are on a curve defines by the quadratic equation Ax^2 + Bx + C = y
starting with the three x,y values, how do I solve for the values A,B,C (programatically) so that I can insert a new x value and calculate its associated value(s) of y.
I will be doing this with PHP on the server side of a web connection.
Any assistance would be greatly appreciated!!
Solving some 'math' problems
Moderator: General Moderators
Re: Solving some 'math' problems
x1, y1 = 1, 2
x2, y2 = 3, 4
x3, y3 = 5, 6
This would give you three equations:
A + B + C = 2
9*A + 3*B + C = 4
25*A + 5*B + C = 6
Then, you simply solve these three equations. If you don't know how to solve the equation system, you need to read up on your math. Or, just ask and I can solve the general case equation system and write it up in code for you...
/Johan
x2, y2 = 3, 4
x3, y3 = 5, 6
This would give you three equations:
A + B + C = 2
9*A + 3*B + C = 4
25*A + 5*B + C = 6
Then, you simply solve these three equations. If you don't know how to solve the equation system, you need to read up on your math. Or, just ask and I can solve the general case equation system and write it up in code for you...
/Johan