Minimal rotation to avoid collision of circles

132 Views Asked by At

The discriminant of a certain quadratic equation which determines when two circles (hyperspheres?) will collide, provided they travel with a constant velocity is

$$(\Delta v\cdot\Delta s)^2-(\Delta v\cdot\Delta v)\times(\Delta s\cdot\Delta s-r^2)$$

where $\Delta v$ is the difference in the velocities of two circles, $\Delta s$ is the difference of their positions, and $r$ is the sum of their radii. What is the minimal rotation of $\Delta v$ that will make this discriminant negative, and therefore avoid the collision of the circles?

I have spent many, many hours trying to massage the above into various mathematical packages, and I've received many incomprehensible multi-screen equations and many useless results with $cos(\theta)$ and $sin(\theta)$ on both sides, which I could not resolve.

Any suggestions would be nice, a numerical solution would also suffice.

1

There are 1 best solutions below

3
On BEST ANSWER

You have the discriminant as $$ (\Delta v\cdot \Delta s)^2 - (\Delta v \cdot \Delta v)(\Delta s\cdot \Delta s - r^2) = |\Delta v|^2 |\Delta s|^2\left(\cos^2\theta-1+\frac{r^2}{|\Delta s|^2}\right), $$ where $\cos\theta=(\Delta v \cdot \Delta s)/(|\Delta v||\Delta s|)$. To make this negative, you need to have $\left\lvert\cos\theta\right\rvert<\sqrt{1-r^2/|\Delta s|^2}$, or $-\cos^{-1}(\sqrt{1-r^2/|\Delta s|^2}) < \theta < \cos^{-1}(\sqrt{1-r^2/|\Delta s|^2})$. If this does not already hold, then the minimal rotation to do it will be a rotation of $\Delta v$ in the plane containing both $\Delta v$ and $\Delta s$, by an angle $\left\lvert\theta\right\rvert - \cos^{-1}(\sqrt{1-r^2/|\Delta s|^2})=\left\lvert\theta\right\rvert - \sin^{-1}(r/|\Delta s|)$.