0
$\begingroup$

I'm trying to find the mathematical equation or concept to calculate an intersection of two bullets at different speed.

So basically it's like an intersection of two lines, but I'm trying to add time into it. So the lines still intersect, but it only counts at certain intervals (each different for each line). Which turns it into like bullets going at different speeds.

I feel like there's already formula for this because of air control are able to prevent flight collisions because of this. Or I'm just wrong and they are using some other algorithms to predict.

$\endgroup$

1 Answer 1

1
$\begingroup$

This is not so bad - we simply parametrize the bullets' paths in 2D space as a function of time. Then, instead of having a line that is constant throughout time, the problem is more similar to the question you are asking - at any given time, you have a point (the bullet), and the path that the bullet takes is given by a line. But you want to find out if one bullet touches another bullet, which only occurs if the position and time match.

An example:

Let's say bullet 1 is fired from a gun (located 1.2km north of some arbitrary place - let's call it the origin), travelling south at $600 \text{ m/s}$. Further, say bullet 2 is fired from a gun (located 0.9km east of the origin), travelling west at $450 \text{ m/s}$. Now, we can parametrize the path of the bullets as follows:

$$p_1(t) = (0,-0.6t+1.2)$$ $$p_2(t) = (-0.45t+0.9,0).$$

Now, we want to find a time where the positions are the same, so we set the coordinates equal to each other and solve the system of equations:

$$0 = -0.45t+0.9,$$ $$-0.6t+1.2=0.$$

Now, if you remember your algebra, you'll know that this system of equations has two equations and only one variable, which means it's overdetermined! And you would be right - usually, overdetermined systems have no solutions. But, there are special cases, like this one in particular - the two equations are actually one single equation, just scaled differently. So, noticing that $0.6 = 1.5*0.45$ and $1.2 = 1.5*0.9$, we can just erase one of these equations and solve the remaining one:

$$-0.6t + 1.2 = 0,$$ which has solution $t = 2 \text{ sec}$. So, after two seconds, these bullets will collide.

Now, it's important to realize that in most cases, you won't have a degeneracy (a duplication of an equation) like we did here. Only in very particular cases does this happen. But that makes sense! Most of time, bullets don't collide, so there wouldn't be a solution to the system of equations.

$\endgroup$
1
  • $\begingroup$ This is very insightful and the main reason I want to know is that I want to make two lines never intersect, no matter what time instance. $\endgroup$ Commented Feb 6, 2016 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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