You are not logged in.
login | register

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
<< see all messages in this topic
<previous message | next message >


Subject:   RE: Generating a graph curve from 2 known points and a middle reference point.
Author: Alan Cooper
Date: Aug 9 2006
There is an infinite number of smooth curves that will pass through two given
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" (y-change) is
proportional to the "run" (t or x-change), and the ratio of rise/run is called
the slope.

From x=0 to x=50 the run is 50-0=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 x-value we can
get the corresponding y-value by taking the starting value of 40 and going
down by 2.2 times the run.

This gives y=40-2.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=40-2.2x).

Reply to this message          Quote this message when replying?
yes  no
Post a new topic to the All Tools on Computer discussion
Visit related discussions:
Computer
Tools

Discussion Help