you can also use the angle to represent the slope if you like trig
slope = tan(theta) = 1 so theta = arctan(1) = 45 degrees
then x2 = x1 + 206*cos(theta) = 100 + 206*0.7071 = 245.6626
and y2 = y1 + 206*sin(theta) = 600 + 206*0.7071 = 745.6626
phil...
"Vijay Singh" <vi*******@hotmail.com> wrote in message news:C%*****************@news-binary.blueyonder.co.uk...
"Ashutosh Iddya" <u2******@anu.edu.au> wrote in message
news:3f********@clarion.carno.net.au... HI,
How do you find the other endpoint of a line given one endpoint and the
slope of the line.
Well use the formula of slope
i,e slope between x1, y1 and x2, y2 = y2-y1/x2 -x1
Also how do you display the coordinate on the computer screen knowing
that the Y axis (of the raster display) runs in the reverse direction of
a normal graph.
ex: given two points
x1 = 100
y1 = 600
and given an angle
45 degrees ie the slope(m)of the line is 1
and given the distance of 206 units
how do I find x2 and y2(the other endpoint of the line)?
use the same slope formula and the also pythgoras theorem.
example :
x2, y2
x1,y1
then slope = y2 - y1/ x2 -x1
and by pythgoras therom square of 206 = square of (x2 - x1) + square
of (y2 - y1)
how do i display it on the computer screen.
thanks,
Ashutosh