Originally Posted by

**HallsofIvy** The simplest way to determine whether two circles are in contact or have collided in the last $\displaystyle \Delta t$ time interval is to calculate the distance between their centers and see if it is less than or equal to the sumof the radii of the two circles. You can speed up the calculation a little by not taking the square root in the distance calculation and comparing it to the square of the sum of the radii, since it is a little faster to square than to take the square root.

That is, if the center of one circle is $\displaystyle (x_0(t), y_0(t))$, which vary with time, with radii $\displaystyle r_0$, a constant, and the other has center $\displaystyle (x_1(t), y_1(t))$ and radius $\displaystyle r_1$. Then the circles will be in contact or have collided since the last time you checked if $\displaystyle \sqrt{(x_1- x_0)^2+ (y_1- y_0)^2}\le |r_1- r_0|$ or, a little faster, $\displaystyle (x_1- x_0)^2+ (y_1- y_0)^2\le (r_1-r_0)^2$.