Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Position, speed and heading are known, and the size and shape of these objects are also known. Gravity is irrelevant, so these objects will be moving in straight lines. I tagged this with geometry and trigonometry but I'm not sure exactly where it should go.

share|cite|improve this question
This sounds very much like a problem in programming (in part, at least) - if so, I would suggest that you do a google search for "collision detection". Here is one page that might be helpful: – Martin Wanvik Apr 3 '12 at 15:40
If you didn't already do this, drawing a picture and the relevant data may help. – john w. Apr 3 '12 at 20:07
up vote 1 down vote accepted

It depends on the shape of those objects. What is it ? Here is an answer assuming they are spheres.

If $x_1(t)$ and $x_2(t)$ are the positions of the centers of both objects at time $t$ (assumed to be spherical, of radii $R_1$ and $R_2$) then they will collide if and only if there is a $t$ such that $|x_1(t)-x_2(t)|<R_2+R_1$. (equation E)

If they are moving at constant speed $v_1$ and $v_2$, starting at initial positions $x_1^0$ and $x_2^0$ then this is achived iff $|x_1^0 - x2^0 + t (v_1-v_2)| < R_2 + R_1 $ has a solution for $t$ (it's a simple system of three inequalities).

Now if your objects are not spherical, the problem is more complicated (for example, they can spin). But if object one is contained within a sphere of radius $R_1$ (the same with object 2 and $R_2$) you can say that if (E) has no solution then they won't collide, and if your objects contain spheres of radii $r_1$ and $r_2$, then if (E) with $r_1$ and $r_2$ has a solution, they will collide.

share|cite|improve this answer
Calculating the shape of these objects is a question unto itself. Spheres are a good approximation for now though. – Garzahd Apr 3 '12 at 15:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.