# Thread: Calculate points on a line

1. ## Calculate points on a line

Hi,

How can I calculate all the points on a diagonal line if I only know the x/y coordinates of 2 fixed points.

See the picture, only 2 points are known (the x/y coordinate) and I want to know the other 3 points on the line. And lets say the distance/space between each point is 1cm.

Thanks.

2. ## Re: Calculate points on a line

Hi Fri I'm don't know well in English but I know how to solve it.first we have to find third by ((2+4)/2;(1+5)/2) then find second point like before

3. ## Re: Calculate points on a line

Isn't there a way to get each point by incrementing it by 1cm?

4. ## Re: Calculate points on a line

Originally Posted by mplus
Hi,

How can I calculate all the points on a diagonal line if I only know the x/y coordinates of 2 fixed points.

See the picture, only 2 points are known (the x/y coordinate) and I want to know the other 3 points on the line. And lets say the distance/space between each point is 1cm.

write the equation for the line ...

$m = \frac{5-1}{4-2} = 2$

$y - 1 = 2(x - 2)$

$y = 2x - 3$

evaluate y for the x values you desire between 2 and 4

5. ## Re: Calculate points on a line

Originally Posted by mplus
Hi,

How can I calculate all the points on a diagonal line if I only know the x/y coordinates of 2 fixed points.

See the picture, only 2 points are known (the x/y coordinate) and I want to know the other 3 points on the line. And lets say the distance/space between each point is 1cm.
So you have a total of five points, including the endpoints, and the distance between tonsecutive points is 1 cm?
That's impossible- the length of the line is $\sqrt{(4- 2)^2+ (5-1)^2}= \sqrt{4+1}= \sqrt{5}$, not 4 as it would have to be to have 1 cm between them. If you simply mean "3 points equally distribute between (2, 1) and (4, 5)", then they must have distance $\frac{\sqrt{5}}{4}}$ between them. Also the slope of the line is (5- 1)/(4- 2)= 4/2= 2. The first point (the one closest to (2, 1)), must satisfy $\sqrt{(x- 1)^2+ (y- 2)^2}= \frac{\sqrt{5}}{2}$ or $(x-1)^2+ (y-2)^2= \frac{5}{4}$ and $\frac{y- 1}{x- 2}= 2$ or $y-1= 2(x-2)$. The second must satisfy $\sqrt{(x- 1)^2+ (y- 2)^2}= 2\frac{\sqrt{5}}{2}$ or $(x-1)^2+ (y-2)^2= 5$ as well as $y- 1= 2(x- 2)$. The third must satisfy $\sqrt{(x- 1)^2+ (y- 2)^2}= 3\frac{\sqrt{5}}{2}$ or $(x-1)^2+ (y-2)^2= \frac{45}{4}$ and $y-1= 2(x- 2)$.

Thanks.

6. ## Re: Calculate points on a line

No the total distance from point 1 to 5 isn't 1cm. Its supposed to be 4.46cm. I mean to get the 3 points increased by 1.18cm to end up with 3 points. And get the xy coordinate of those 3 points.

So yes the idea is to get the coordinate of 3 points equally distributed between the 2 known coordinates yes.

I didn't really get the math part you wrote at the second paragraph.

You said the second points, so the one in the middle, is 5? I want its x y coordinate.

I didn't get this part either:

y = 2x - 3

evaluate y for the x values you desire between 2 and 4

7. ## Re: Calculate points on a line

if you evenly divide the interval from x = 2 to x = 4 into four equal parts, you get the x-values 2, 2.5, 3, 3.5 and 4

the evenly spaced coordinates would be

(2 , 1)

(2.5 , 2)

(3 , 3)

(3.5 , 4)

(4 , 5)

if you do not know how to write a linear equation between two points, then I recommend you visit this link and study the lesson ...

Straight-Line Equations: Slope-Intercept Form

8. ## Re: Calculate points on a line

Hello, mplus!

How can I calculate the points on a diagonal line if I only know the x/y coordinates of 2 fixed points.

See the picture, only 2 points are known (the x/y coordinate) and I want to know the other 3 points on the line. And lets say the distance/space between each point is 1cm.

Look at what we have:

. . $\begin{array}{ccccccccccc} (2,1)\;\bullet &--& \bullet &--& \bullet &--& \bullet &--& \bullet \;(4,5) \end{array}$

We want to divide the line segment into four equal segments.

The x-coordinates range from 2 to 4.
. . Hence, the x-coordinates are: . $2,\,2\tfrac{1}{2},\,3,\,3\tfrac{1}{2},\,4$

The y-coordinates range from 1 to 5.
. . Hence, the y-coordinates are: . $1,\,2,\,3,\,4,\,5.$

Therefore, the five points are: . $(2,\,1),\:\left(\tfrac{5}{2},\,2\right),\:(3,\,3), \:\left(\tfrac{7}{2},\,4\right),\:(4,\,5)$

Ah ... skeeter beat me to it . . .

9. ## Re: Calculate points on a line

Ah thanks, that did it.