Calculate Interception Angle for Enemy B

  • Thread starter thomasvt
  • Start date
  • Tags
    Angle
In summary, Johnny found a way to solve the problem without input from the distance between the tower and the enemy.
  • #1
thomasvt
7
0
Hey,

I like writing puzzle games, and normally i solve my physics programming challenges on my own, but this problem i have now reveiled itself to be quite a tough one. Even after involving my smarter friends :) Probably plain easy for motion physics adepts, but i forgot most of my fysics and goniometrics i learned in school, except for the things i use in physics programming all the time.. so i need a bit of help :)

view:
from above, like looking at a road-map

objects:
A = static canontower
- shoots bullets (no friction, gravity) at v = constant (eg 600m/s)
- can turn around its pivot so can shoot the bullet in any desired direction
B = an enemy
- moves at v = constant (eg 200m/s) at some direction (so it has a 2D velocity vector)

question (if you didn't guess it by now)
* what angle should BÂC be so that the bullet intercepts enemy B at unknown point C


******(enemy)*******
**********B-->*-*-*-*-*C*(interception*point)
***********\**************/
************\************/
*************\**********/
*************\*********/
**************\*******/
***************\*****/
***************\****/
****************\**/
******************A*(tower*-*startposition*of*bullet)





I already fixed this problem, but i doubt my solution to be correct:
s = vt ==> s/v = t
==>
|BC| / vb = t = |AC| / va (vb = enemy speed, va = bulletspeed)
hence: |BC| = |AC| * vb / va (for instance)

And also that the "sinus rule" (literaly translated from Dutch) will probably lead me to calculating the BÂC angle. With sinus rule i mean: sin A / |BC| = sin B / |AC| = sin C / |AB| (or something like that)

Using this "sinus rule" i come to:
sin A = sin B / |AC| * |BC|
and using my former |BC| formula, i get:
sin A = sin B / |AC| * (|AC| * vb / va)
=>
sin A = sin B * vb * va
and since vb and va are known, and sin B easily calculated, i should have a solution..

but my guts tell me it can't be this easy (i expect a quadratic function because it involves intersection of 2 circles, i believe) and besides, my result doesn't need input from the distance between tower and enemy, which is obviously influencing the whole thing...

so, any solutions from you, please?

thank you very much
 
Last edited:
Physics news on Phys.org
  • #2
the drawing is a bit messed up, but i think the triangle i meant to show is clear enough
 
  • #3
How about using parametric equations to work out the position of a point along a line at time 't', do this for both the bullet and enemy, then make the 'x' or 'y' components of each vector equal then solve for 't'.

You can then work out the angle from the length AC.
 
  • #4
Hi Johnny,

because my question remained unanswered for quite a while, I already found a method for solving this problem. And it is exactly as you summarize.

In the meantime though, I found out that my problem is a bit more complex, you still need to rotate the cannon to that angle, which takes time too. So by the time you get there, the situation has changed again.

But, by now I already have resolved my entire problem, so no more question marks left :)

thanks for the answer !
 
  • #5
for your help!


Hello,

Thank you for reaching out for help with your physics problem. It is always great to see people using their creativity and problem-solving skills to create games and puzzles. I am happy to assist you with your question about calculating the interception angle for enemy B.

First, I want to commend you for your efforts in trying to solve this problem on your own. Your approach using the distance and velocity equations is a good start. However, as you mentioned, it may not take into account the distance between the tower and the enemy, which is an important factor in determining the interception angle. Also, the sin rule may not be the most appropriate method to use in this scenario.

A more accurate approach would be to use vector mathematics. This involves breaking down the velocities of the bullet and the enemy into their x and y components. Then, using the distance and time equations, you can determine the position of the enemy at the time of interception. From there, you can calculate the angle between the bullet's position and the enemy's position, which will give you the interception angle.

I understand that vector mathematics may seem daunting, but I encourage you to do some research and practice to refresh your knowledge. It will definitely help you in solving this problem and future physics challenges.

I hope this helps and good luck with your game development! Keep up the great work.

Best,
 

1. How do you calculate the interception angle for an enemy B?

The interception angle for an enemy B is calculated by using the Law of Sines. This involves measuring the distance between the target and the interceptor, as well as the speed and angle of the interceptor. The formula for the interception angle is sin(A) = (Vt/Vi) * sin(B), where A is the interception angle, Vt is the target's speed, and Vi is the interceptor's speed.

2. What factors affect the interception angle for enemy B?

The interception angle for enemy B is affected by various factors such as the speed and direction of the target, the speed and direction of the interceptor, and the distance between the two. Other factors that may affect the interception angle include environmental conditions and the type of weapon or technology being used.

3. How accurate is the calculation of the interception angle?

The accuracy of the calculation of the interception angle depends on the accuracy of the measurements and data used in the calculation. Small errors in measurements or data can result in significant differences in the calculated interception angle. It is important to use precise and reliable measurements and data to ensure the accuracy of the calculation.

4. Can the interception angle be calculated in real-time?

Yes, the interception angle can be calculated in real-time using advanced tracking and targeting systems. These systems use real-time data and measurements to continuously calculate and adjust the interception angle as needed to intercept the target accurately.

5. How is the interception angle used in military operations?

The interception angle is a crucial factor in military operations, particularly in air defense systems. It is used to determine the optimal trajectory for the interceptor to successfully intercept and neutralize the target. The interception angle is also used to assess the effectiveness of different weapons and technologies in intercepting enemy targets.

Similar threads

  • Programming and Computer Science
Replies
7
Views
989
  • Precalculus Mathematics Homework Help
Replies
7
Views
519
  • Introductory Physics Homework Help
5
Replies
157
Views
7K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Introductory Physics Homework Help
Replies
4
Views
3K
Replies
4
Views
4K
Replies
4
Views
2K
Replies
6
Views
3K
  • Introductory Physics Homework Help
Replies
2
Views
2K
Back
Top