Let (x1,y1) be (5,5) and (x2,y2) be (20,20).

The equation of the segment would be

(y-5)/(15) = (x-5)/(15)

y-5 = x-5

y-x=0.

The point (10,10) satisifies this equation.

Therefore, the point (10,10) lies on the segment.]]>

where x and y is the point

with x1,y1 the start of the line and x2,y2 the end of the line

(x2-x1) * X - (y2-y1) * y = 0

]]>start of line = (5,5)

end of line = (20,20)

point = (10,10)

would the point be on the line?

]]>The segment has one end at the origin ( 0,0 ) and the other end at (a,b).

Therefore, the equation of the straight line is

(y-y1)/(y2-y1) = (x-x1)/(x2-x1)

(x1,y1) = ( 0,0 ), (x2,y2) = (a,b)

Thus, yb=ax

or yb-ax=0 is the equation of the segment.

We know the point (a,b). It could be (1,4) or (5,8) or (-1,4) etc.

Thus, an equation in two variables of degree 1(a linear equation) is obtained.

If the random point is a solution for the equation of the segment, then the point lies on the segment. Otherwise, it does not.]]>

i need to calculate if another random point is on the path of that line

any 1 know how?

]]>