1
$\begingroup$

I dropped out of school to early I guess, but I bet you guys can help me here. I've got a sloped line starting from point a(0|130) and ending at b(700|0).

I need an equation to calculate the y-coordinate when the point x is given, e.g. 300. Can someone help me please ? Sorry for asking such a dumb question, can't find any answer here, propably just too silly to get the math slang ;)

  • 1
    Thanks for your answers, helped me a lot, now I can draw some text in my php script at the right point :D2011-09-26

2 Answers 2

1

So we have a point $(0, 130)$ and another point $(700, 0)$. The equation for this line would then be $y = -\dfrac{130}{700} (x) + 130$. So to get the height at a particular x, you just plug x into this equation.

Here is another reference.

1

You want the two point form of a linear equation. If your points are $(x_1,y_1)$ and $(x_2,y_2)$, the equation is $y-y_1=(x-x_1)\frac{y_2-y_1}{x_2-x_1}$. In your case, $y=-\frac{130}{700}(x-700)$