# Trajectory equation

This topic is 3070 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I need a trajectory formula:

Given the initial launch angle, the relative position of the target in x AND y (not the same horizontal plane), and gravity, how do I determine the initial launch speed?

I've been playing around trying to manipulate equations from here but no luck: http://en.wikipedia.org/wiki/Trajectory_of_a_projectile

If you can help thanks much!
-John

##### Share on other sites
Try to work out an example by hand. Post what you are doing (your plan and your computations) so we can see where you are getting stuck or where you are making a key mistake.

##### Share on other sites
Here's the solution; see if you can derive it yourself:

$v=x\sec\theta\sqrt{\frac{g}{2(y-x\tan\theta)}$

##### Share on other sites
Quote:
 Original post by johnnykI need a trajectory formula:Given the initial launch angle, the relative position of the target in x AND y (not the same horizontal plane), and gravity, how do I determine the initial launch speed?I've been playing around trying to manipulate equations from here but no luck: http://en.wikipedia.org/wiki/Trajectory_of_a_projectileIf you can help thanks much!-John

These are the equations of the motion:

x = (vcos(theta))t (1)
y = (vsin(theta))t - 1/2gt² (2)

The trajectory is the set of points (x,y) that verify those equations. You're not searching for a trajectory formula, you're simply searching for the value of v knowing a point of the trajectory (x*,y*) and the angle theta. By the way, if you use these equations, you will need to change the sign of y and x (edit: in the denominator) of the solution given by luca-deltodesco. It would be better for you to show us where you're stuck: it will provide you the occasion to learn something and not simply grab the solution.

P.S:
in (2): -1/2g if the gravity has the opposite direction of the y-axis, +1/2g otherwise.

[Edited by - johnstanp on July 16, 2010 11:31:04 AM]

##### Share on other sites
Thanks guys, very helpful. I went ahead and dusted off my algebra and solved those equations myself, solving for t then substituting into the other equation, then solving for v. I got the same result as luca, except a -2 term instead of a 2 (probably an oversight on my part).

Thanks again! I'll try it out in my game.

##### Share on other sites
Quote:
 Original post by johnnykI got the same result as luca, except a -2 term instead of a 2 (probably an oversight on my part)

Off the top of my head, that probably just means we just had an opposing sign in the original equation: aka one of us had s = ut + 1/2at^2 and the other had s = ut - 1/2at^2

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633660
• Total Posts
3013221
×