How to find if and when two volumetric 2d objects (balls) will collide

I have a situation of two 2d objects (balls with radii of 5 each) moving along straight lines. I know their velocity, their acceleration, initial coordinates and direction.

Please note, I'm not 100% sure that it is possible to answer this at all. This is not a homework and not an exercise from a textbook. So if anyone thinks that there is no way to solve this, please let me know.

If they were dots, I would know how to find the answer: simply find their trajectories intersection, distances from their initial positions to the point of the intersection and solve the equation with a time variable:

$$V_{i1} * t + \frac{1}{2} a_1 t^2 = V_{i2} * t + \frac{1}{2} a_2 t^2$$

That would answer the question if and when would the objects collide.

But since I have balls this approach doesn't help. They can collide much sooner then the intersection of their centers would occur.

The only thing I was able to come up with is to find an inequality of distance between the balls' centers and try to find when the distance will become less than two times a ball's radius:

$$\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} <= 10 \\ \sqrt{(x_2 - x_1)^2 + (kx_2 + b_2 - kx_1 - b_1)^2} <= 10$$

Trying to solve the equation

$$\sqrt{(x_2 - x_1)^2 + (kx_2 + b_2 - kx_1 - b_1)^2} = 10\\ (x_2 - x_1)^2 + (kx_2 + b_2 - kx_1 - b_1)^2 = 100$$

to find values of $x_1$ and $x_2$ is hopeless, since there are two variables $x_1$ and $x_2$ and only one equation.

So I have no idea, where should I proceed now. Could anyone either tell me how to solve this exactly or at least suggest in what direction should I proceed?

Thank you.

If you know the balls' velocities and acceleration, then your only variable is really time:

$$x= x_{initial} + vt + \frac{1}{2} a t^2$$

Substitute this for $x_1$ and $x_2$, and you can theoretically solve for the time of collision. Albeit the algebra could get messy...

• the only remark on this is that one must take the initial velocity along the X axis, that is Vx=Vorig*Cos(the angle between the trajectory and the X axis). Probably I'll try to substitute on only X-es, but Y-s also with respect to the Vy.
– d.k
Oct 10, 2017 at 10:42