You do not need to look for a collision point for the collision calculation itself. To detect a collision event, you just need to compare the distance from the centers, going over the sum of the radii
sqrt(sqr(x2-x1)+sqr(y2-y1))<=r1+r2
or
dx*dx+dy*dy <= (r1+r2)*(r1+r2)
where (x1,y1)and (x2,y2)are the positions of the disks 1 (with mass m1, radius r1and speed (vx1,vy1)) and 2. The differences are always 2 minus 1, dx=x2-x1etc.
You will almost never realize that a collision occurs at a point in time sampling time. With the above formula, the circles are already overlapping. Depending on the time step and overall speeds, this may be negligible or may result in a serious shootout. The following simple calculations assume slow motion, i.e. Very little overlap in the last step.
, , - . , , ,
dx*dvx+dy*dvy < 0
dvx=vx2-vx1 ..
, ( . fooobar.com/questions/1627358/...)
dx = x2-x1; dy = y2-y1;
dist2 = dx*dx + dy*dy;
R = r1+r2;
if ( dist2 <= R*R )
{
dvx=vx2-vx1; dvy=vy2-vy1;
dot = dx*dvx + dy*dvy;
if ( dot < 0 )
{
factor = 2/(m1+m2)*dot/dist2;
vx1 += m2*factor*dx;
vy1 += m2*factor*dy;
vx2 -= m1*factor*dx;
vy2 -= m1*factor*dy;
}
}