Applying parabollic shooting

  • Thread starter xev
  • Start date
It is determined by the other constants.If you want to think of it as a function, then you are minimzing t as a function of α.In summary, the conversation is about a person developing a real-time strategy game involving tanks and encountering a problem with applying parabolic shooting to simulate the bullets. They are using typical formulas for projectile motion but now need to calculate the alpha that would take the bullet the minimum time. They are stuck and need help with the calculus involved. It is suggested to solve for t as a function of α and set the derivative equal to 0 to determine the angle that minimizes the time. However, it is pointed out that the system is overdetermined and there is no freedom to
  • #1
xev
Hi!

As a part of a subject project I'm developing a game. It is a kind of real-time strategy game where two teams of tanks have to destroy each other (not very original, but interesting enough).

I have come across a problem I cannot solve: applying parabollic shooting to simulate their bullets.

I use the typical formulas:
x=x0+vx*t
vx=v0*cos(a)
y=y0+vy*t-0.5*g*(t)^2
vy=v0*sin(a)

where a=alpha, g=gravity (9.8 default) and v0=initial velocity modulus

What happens is that I had always used these formulas to calculate some typical things like: maximum height reached, ending x, etc.

But now, given an initial point, a final point and an initial velocity, I need to calculate the alpha that would take the bullet the minimum time.

I need to have a function f(t), to minimize it to know the minimum time and then get the alpha. But I always get struck in the depths of the calculus.

Can anybody help me, please? Thank you.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2


Originally posted by xev
Hi!

Hi, and welcome to PF. Same Xev from sciforums and philosophyforums I presume?

I use the typical formulas:
x=x0+vx*t
vx=v0*cos(a)
y=y0+vy*t-0.5*g*(t)^2
vy=v0*sin(a)

But now, given an initial point, a final point and an initial velocity, I need to calculate the alpha that would take the bullet the minimum time.

I need to have a function f(t),

Actually, what you need is t as a function of α. You will want to differentiate t(α) with respect to α and set derivative equal to 0, yadda yadda yadda.

to minimize it to know the minimum time and then get the alpha. But I always get struck in the depths of the calculus.
]

It sounds like you've got the calculus and are getting lost in the depths of the algebra. :smile:

I've highlighted the function you need above. You could alternatively use the equation for y, but it is more complicated so I'm sticking with the equation for x. What you do is solve it for t.

x-x0=v0cos(α)t
(x-x0)/(v0cos(α))=t

Now, can you fill in the yaddas?
 
  • #3
ballistics(2)

Hi there

>>Same Xev from sciforums and philosophyforums I presume?

I am afraid I don't even know of the existence these sci/philosofyforums.

>>yadda

Since English is not my native language, I don't know what you mean by yadda yadda (maybe it means etc or something more specific?)

-> my progress: I've taken care of your funcion, trying to minimize it. But I reach the following statement:
cos(a) + x * sin(a)=0

I should get the alpha as a function of x, but I cannot find any way to be able to isolate the alpha and to continue working on it. Do you know how these equations are solved? Thank you!

>>Welcome to PF

Thanks!
 
  • #4


Originally posted by xev
>>yadda

Since English is not my native language, I don't know what you mean by yadda yadda (maybe it means etc or something more specific?)

Yes, it means "et cetera". It's from Seinfeld. :D

-> my progress: I've taken care of your funcion, trying to minimize it. But I reach the following statement:
cos(a) + x * sin(a)=0

t as a function of α is:

t(α)=((x-x0)/v0)(cosα)-1

You need to take the derivative of that with respect to α. Use the chain rule:

t'(α)=((x-x0)/v0)(-1)(cosα)-2(-sinα)
t'(alpha;)=((x-x0)/v0)sinα/cos2α

That is what you should set equal to zero. Solve for α, and you have your angle that minimizes the time.

I should get the alpha as a function of x, but I cannot find any way to be able to isolate the alpha and to continue working on it. Do you know how these equations are solved? Thank you!

Why are you looking for α as a function of x? x is fixed, and anyway you are trying to minimize the time. If I am understanding you correctly, you definitely need t as a function of α, as I outlined above.
 
  • #5
Ballistics(3)

t'(alpha;)=((x-x0)/v0)sin¥á/cos2¥á

then I do:

((x-x0)sin¥á)/(v0*cos2¥á)) = 0

then:

(x-x0)sin(a)=0

we get: a=k*PI

referring to the original function, I substitute the reached alpha:

t(k*PI)=((x-x0)/v0)/(cos(K*PI))

Because we need positive times, I restrict alpha to being 2*k*PI

then t(2*k*PI)=t(¥á)=((x-x0)/v0)/(cos(2*k*PI))= (x-x0)/v0

So the conclusion is: the best alpha is 0¨¬
This isn't useful for me, am I doing something wrong or maybe I amb approaching the problem with the incorrect method?

Thank you !
 
  • #6
OK, I think I see the problem. What you have here is an overdetermined system, and this will become apparent when I eliminate the t from the parametric equations for x and y.

x-x0=v0cos(α)t
y-y0=v0sin(α)t-(1/2)gt2

Solve the first equation for t.

t=(x-x0)/(v0cos(α))

Plug this into t in the second equation.

y-y0=v0sin(α)((x-x0)/v0cos(α))-(1/2)g((x-x0)/v0cos(α))2

I could clean this up a bit, but I don't need to to make my point. y, y0, x, x0, v0 and g are all fixed. α is the only thing left, so it is fixed too. You don't have freedome to let it vary to optimize the time.
 

1. What is the concept of parabolic shooting?

The concept of parabolic shooting involves launching an object at an angle to the ground in order to achieve a parabolic trajectory. This type of shooting is commonly used in sports such as basketball and football, as well as in fields such as physics and engineering.

2. How is parabolic shooting applied in real life?

Parabolic shooting has various practical applications in real life, such as in sports, military operations, and space exploration. For example, in sports, parabolic shooting is used to score points by shooting a ball into a goal or basket. In military operations, parabolic shooting is used to accurately hit targets at a distance. In space exploration, parabolic shooting is used to launch rockets and spacecraft into orbit.

3. What are the factors that affect parabolic shooting?

The factors that affect parabolic shooting include the initial velocity of the object, the angle at which it is launched, and the effects of air resistance and gravity. The shape, weight, and size of the object can also affect its trajectory. Additionally, external factors such as wind and temperature can also impact parabolic shooting.

4. How do you calculate the trajectory of a parabolic shot?

The trajectory of a parabolic shot can be calculated using mathematical equations that take into account the initial velocity, angle of launch, and other factors. These equations can be solved using basic trigonometry and physics principles. Alternatively, there are also online calculators and software programs available that can calculate the trajectory for you.

5. What are some advantages of using parabolic shooting over other shooting methods?

One of the main advantages of parabolic shooting is its accuracy. By adjusting the initial velocity and angle, parabolic shooting allows for precise targeting and can be used to hit specific targets at a distance. Additionally, parabolic shooting can also be used to achieve longer distances compared to other shooting methods. Lastly, parabolic shooting can be used in various fields and applications, making it a versatile and useful technique.

Similar threads

  • Introductory Physics Homework Help
Replies
29
Views
6K
  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
30
Views
3K
  • Introductory Physics Homework Help
Replies
10
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
14
Views
1K
  • Introductory Physics Homework Help
Replies
7
Views
2K
  • Introductory Physics Homework Help
Replies
4
Views
3K
  • Introductory Physics Homework Help
Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
1
Views
2K
Back
Top