Find a function describing distance between a moving point and a fixed point

96 Views Asked by At

In 2D space, a point moves at a constant velocity (vx, vy) starting from position (x1, y1). A second, stationary point is located at (x2, y2). What is the function describing distance between the moving and the stationary point over time t?

distance(t) = some expression over x1, x2, y1, y2, vx and vy
2

There are 2 best solutions below

0
On BEST ANSWER

The euclidean distance at time $t$ is given by:$$d(\pmatrix {x_1\\y_1}+t\pmatrix{v_x\\v_y},\pmatrix{x_2\\y_2})=\sqrt{(x_1-x_2+tv_x)^2+(y_1-y_2+tv_y)^2}$$

0
On

Ok, this is embarrassingly easy.

distance(t) = sqrt((x1 - x2 + vx * t) ^ 2, (y1 - y2 + vy * t) ^ 2)

I should have spent more time over it before posting...