Calculate Interception Angle for Enemy B

  • Thread starter Thread starter thomasvt
  • Start date Start date
  • Tags Tags
    Angle
AI Thread Summary
The discussion revolves around calculating the interception angle for a bullet fired from a stationary cannon tower to hit a moving enemy. The original poster initially struggled with the physics involved, particularly in applying the sine rule and motion equations to determine the angle for interception. They proposed a formula relating the distances and speeds of the bullet and enemy but doubted its accuracy due to the lack of consideration for the distance between the tower and the enemy. Eventually, they found a solution using parametric equations but noted that the time taken to rotate the cannon also affects the interception. The problem was ultimately resolved, indicating a successful application of physics principles.
thomasvt
Messages
7
Reaction score
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
the drawing is a bit messed up, but i think the triangle i meant to show is clear enough
 
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.
 
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 !
 
Thread 'Is there a white hole inside every black hole?'
This is what I am thinking. How much feasible is it? There is a white hole inside every black hole The white hole spits mass/energy out continuously The mass/energy that is spit out of a white hole drops back into it eventually. This is because of extreme space time curvature around the white hole Ironically this extreme space time curvature of the space around a white hole is caused by the huge mass/energy packed in the white hole Because of continuously spitting mass/energy which keeps...
Why do two separately floating objects in a liquid "attract" each other ?? What if gravity is an emergent property like surface tension ? What if they both are essentially trying to *minimize disorder at the interfaces — where non-aligned polarized particles are forced to mix with each other* What if gravity is an emergent property that is trying to optimize the entropy emerging out of spin aligned quantum bits
Back
Top