[Math] How to find the intersection point of two moving circles

circlescollision detectiongeometry

I'm trying to develop a simulation in C#, and I have to find the intersection (or collision) point of two moving circles, in 2D space.

Actually one of my circles will be stationary, so only one of them will be moving (linearly, i.e. constant velocity)

So I have two circles with radii R1 and R2, and center points P1 and P2, and the point P1 is changing with constant velocity V1, so I need a way to determine at which point will they collide, also to check if they will collide at all.

Thanks for any help !

Edit :

For the checking (if they will collide) part, I think we can do it by simply calculating the shortest distance between the first circle's velocity line, and the second circle's center, and checking if the distance is greater than R1+R2, so the only thing remains is to find the collision point.

So the question is :

I am assuming the circles will collide, and I need an expression for the collision point P, in terms of P1, P2, R1, R2 and V1.

Best Answer

  1. Find the position of both centers at the time of collision. The position $P_1(t) = p_0 + V_1 t$ defines a line parametrized in $t$. You can then compute the distance $d(P_1(t),P_2)$ between the centers and solve for $d(P_1,P_2) = R_1 + R_2$. You will want to take the solution that is the lowest value of $t$ (when they first collide, rather than when they stop colliding). This will give you the position of $P_1$ at the moment of collision by plugging in your value of $t$.
  2. Find the point of collision based on the center positions at collision time. Given $P_1$ and $P_2$ at collision time, $\frac{R_2}{R_1+R_2}P_1 + \frac{R_1}{R_1+R_2} P_2$ will be the point of collision.
Related Question