Quote:Find the slope m=(x1-x2)/(y1-y1) and make a loop of x where y=mx+c (c=0). now get
(x,y) for a range of x. I'm not sure about my equations. please check those are correct or not.
Correct equations, given (x1, y1) (x2, y2):
m = (y1 - y2) / (x1-x2);
c = y1 - x1 * m;
Then, for any given x:
y = mx + c;
The above answer works fine for non vertical lines where X stays constant.
If X stays constant as in a straight vertical line, e.g. at every point on the line X = 2 or 3 ....., the above equation will not work.
Also, between any two points on any type of line, there are an infinite amount of points. Therefore, you would have to specify some type of period either on x or y, e.g. loop get every point at x\y = 0.000001 to 666.00001.