Discussion:  All Tools on Computer 
Topic:  Generating a graph curve from 2 known points and a middle reference point. 
Post a new topic to the All Tools on Computer discussion 

Subject:  RE: Generating a graph curve from 2 known points and a middle reference point. 
Author:  Alan Cooper 
Date:  Aug 9 2006 
points. Usually when people have only two data points they assume the curve is a
straight line, in which case, over any interval the "rise" (ychange) is
proportional to the "run" (t or xchange), and the ratio of rise/run is called
the slope.
From x=0 to x=50 the run is 500=50. Since your y changes from +40 to 70,
the "rise" is 110 so the slope is 110/50=2.2 (the line actually goes
down rather than up so the slope is negative). So for any other xvalue we can
get the corresponding yvalue by taking the starting value of 40 and going
down by 2.2 times the run.
This gives y=402.2x
If you had actually specified a "middle reference point" that was not on the
straight line, then one way to get a smooth curve through all three points would
be to fit a parabola given by a quadratic equation of the form y=c+bx+ax^2. When
x=0 this gives y=c so your c would be 40. When x=50 y=70 so
40+50b+2500a=70. This isn't enough info to find both b and a but if you also
had another point to plug in then you could find them just by solving the two
equations.(If a=0 the above equation just gives b=110/50 and we are back to
the straight line y=402.2x).
 
Post a new topic to the All Tools on Computer discussion  
Visit related
discussions: Computer Tools  