# How to use model of point movement

I have got discrete time model of the point x movement to point y stated as:

$$z = x + s\left( \frac{y - x}{||y-x||} \right)$$

where

z - is new position
s- is some offset for example 0,04
|| y - x || - euclidean norm operator
z,x,y are points in some m-dimensional R space


How to use this model (how to calculate) in

1. two dimensional real space where point x (1, 1) moves to point y (4, 2) with s 0,04
2. three dimensional real space where point x(1, 1, 1) moves to point y(3, 2, 3) with s 0,04
-

You would plug in the values into the model. For (1), your coordinates are of the form $(x,y)$. For (2), your coordinates are of the form $(x,y,k)$. Suppose $x = (x_1, x_2)$ and $y = (y_1, y_2)$. Then $||y-x|| = \sqrt{(y_1-x_1)^2+ (y_2-x_2)^2}$. Likewise, if $x = (x_1, x_2, x_3)$ and $y = (y_1, y_2, y_3)$, then $||y-x|| = \sqrt{(y_1-x_1)^2+ (y_2-x_2)^2+ (y_3-x_3)^2}$.
If I understand correctly you are given two points $x$ and $y$, $\ x\ne y$, in some space and define recursively a sequence $(z_n)_{n\geq0}$ by $$z_0:=x\ ,\qquad z_{n+1}:= z_n + s\ {y-z_n \over |y-z_n|}\qquad(n\geq 0)\ .$$ It is pretty obvious that all $z_n$ lie on the line connecting $x$ and $y$, and are equally spaced with distance $s$. Put $$n_0:=\Bigl\lceil{|y -x|\over s}\Bigr\rceil\ ;$$ then $$z_n\ =\ x + n\ s\ {y-x\over |y-x|}\qquad(0\leq n\leq n_0)\ .$$