Finding a future co-linear midpoint of two moving objects

32 Views Asked by At

I have three objects in a 2d space: S, E1, and E2.

E1 and E2 are at some location ((E1x, E1y) & (E2x, E2y)) and moving at constant velocities VE1 and VE2. They will be set initially and not change.

S starts at some location and needs to pick a direction. It has a speed and can only move at this speed.

How does one select the exact direction that will result in S being both equidistant from and co-linear to E1 and E2 in the minimum amount of time.

1

There are 1 best solutions below

1
On BEST ANSWER

Without loss of generality, assume $S$ starts at the origin. If $S$ has constant speed $s$ and chooses a constant heading $\vec h_S$ where $|\vec h_S|=1$ then its position at time $t$ is

$\vec S(t) = (st) \vec h_S$

Let's call the midpoint of $E_1$ and $E_2$ $F$, so at time $t$

$\vec F(t) = \frac 1 2 \left( \vec E_1(t) + \vec E_2(t) \right)$

Then $F$ starts at position

$\vec F(0) = \frac 1 2 \left( \vec E_1(0) + \vec E_2(0) \right)$

and has constant velocity

$\vec v_F = \frac 1 2 \left( \vec v_{E_1} + \vec v_{E_2} \right)$

and so its position at time $t$ is

$\vec F(t) = \vec F(0) + t\vec v_F$

Then $S$ intercepts $F$ at time $t$ if

$(st) \vec h_S = \vec F(0) + t\vec v_F \\ \Rightarrow t(s \vec h_S - \vec v_F) = \vec F(0)$

So $S$ has to choose its heading $\vec h_S$ so that $s \vec h_S - \vec v_F$ is parallel to $\vec F(0)$. As pointed out in a comment, if $s$ is too small this may not be possible.