0

Please excuse my complete ignorance on what should really be something I can work out myself but hoping someone would be kind enough to help.

I am trying to solve the problem where I wish to calculate a point along a line n distance from point p1.

I have looked at the questions How do I find a point a given distance from another point along a line? and How to find a point between two points with given distance? and have tried to apply them to a trivial case for which I know the answer but seem to be stuck.

I have used a trivial example to test where I have point 1 which is 1,1 and point 2 which is 5,1 and I want to calculate 1 step from point 1 which I expect would give me the result 2,1.

When I attempted to calculate these values based on the above formulas I did the following:

y3 = 1 + 1/4 * (1-1)

x3 = 1 + 1/4 * (5-1)

Which gave me the result 2,1.25

Clearly I have messed up somewhere but I am not sure where, can anyone be kind enough to point me in the right direction?

1 Answers1

1

Clearly I have messed up somewhere but I am not sure where

It appears that you computed $1-1=1$ instead of $1-1=0$ when applying the formula for $y_3$,

so you got $1.25$ instead of $1$.

J. W. Tanner
  • 60,406