1 Attachment(s)

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.

Attachment 24318

Thanks.

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

Re: Calculate points on a line

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

Re: Calculate points on a line

Quote:

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.

Attachment 24318

write the equation for the line ...

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

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

$\displaystyle y = 2x - 3$

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

Re: Calculate points on a line

Quote:

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 $\displaystyle \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 $\displaystyle \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 $\displaystyle \sqrt{(x- 1)^2+ (y- 2)^2}= \frac{\sqrt{5}}{2}$ or $\displaystyle (x-1)^2+ (y-2)^2= \frac{5}{4}$ and $\displaystyle \frac{y- 1}{x- 2}= 2$ or $\displaystyle y-1= 2(x-2)$. The second must satisfy $\displaystyle \sqrt{(x- 1)^2+ (y- 2)^2}= 2\frac{\sqrt{5}}{2}$ or $\displaystyle (x-1)^2+ (y-2)^2= 5$ as well as $\displaystyle y- 1= 2(x- 2)$. The third must satisfy $\displaystyle \sqrt{(x- 1)^2+ (y- 2)^2}= 3\frac{\sqrt{5}}{2}$ or $\displaystyle (x-1)^2+ (y-2)^2= \frac{45}{4}$ and $\displaystyle y-1= 2(x- 2)$.

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:

Quote:

y = 2x - 3

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

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

Re: Calculate points on a line

Hello, mplus!

Quote:

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.

Attachment 24318

Look at what we have:

. . $\displaystyle \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: .$\displaystyle 2,\,2\tfrac{1}{2},\,3,\,3\tfrac{1}{2},\,4$

The *y*-coordinates range from 1 to 5.

. . Hence, the *y*-coordinates are: .$\displaystyle 1,\,2,\,3,\,4,\,5.$

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

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

Re: Calculate points on a line