Calculating Position on a Trajectory - Derivation of Equation of Motion

  • Thread starter Iconate
  • Start date
  • Tags
    Trajectory
In summary, to calculate the trajectory angle needed to "throw" an object from an arbitrary point in 2d space to a second point, you can use the equation D^2 * Vix^4 + (9.8 * Dx^2 * Dy - Dx^2 * Vi^2) * Vix^2 + 24.01 * Dx^4 = 0 and solve for Vix (horizontal velocity component). Then, using the horizontal and vertical components of the initial velocity (Vi = sqrt(Vix^2 + Viy^2)), you can determine the angle of the trajectory. This formula assumes angles in degrees, distance in meters, and acceleration of gravity as 9.8 m/s2.
  • #1
Iconate
21
0
I have never taken any physics course before, but I am designing a game in which the projectile(bullet) is going to drop over time.

I want to know which equation do I use to calculate the position on a trajectory. Given that I have the angle, and initial velocity.

http://en.wikipedia.org/wiki/Trajectory

From this would it be the Derivation of the equation of motion as it is the only one I can see there that is returning a y value.

Secondly, if this is true, would the black trajectory here:

http://upload.wikimedia.org/wikipedia/commons/6/63/Inclinedthrow.gif

Represent the kind of output I'm going to see, since (at the moment) I am not incorporating any drag?

Thanks in advance
 
Mathematics news on Phys.org
  • #2
Yes the equation you found indeed gives the height of the trajectory if you know the horizontal displacement. You stated you know the angle and initial velocity, but to get the height you would need either the time is has been traveling or the displacement horizontally. If you have time rather than horiontal displacement, you need a different equation.

And yes, if you are not incorporating any drag it is true that a) The motion will be parabolic and b) the trajectories that reach higher peaks have a longer time of flight.
 
  • #3
Oddly enough, I came here to ask a similar question.

I'm trying to implement a similar situation in a game, but I'm having issues coming up with a good formula.

If I have an object starting an an arbitrary point in 2d space (x,y), how can I calculate the trajectory angle needed in order to "throw" an object and ensure it lands at a second point in 2d space. In my scenario gravity is known, initial velocity is known, and the time it takes to get to the second point is irrelevant. I simply need to calculate the angle I need.

Any ideas?
 
  • #4
Yeah actually, after a lot of searching I came across this

http://babek.info/libertybasicfiles/lbnews/nl130/proj3d.htm

Implemented that in C++, works perfectly.
 
Last edited by a moderator:
  • #5
dsoltyka said:
Oddly enough, I came here to ask a similar question.

I'm trying to implement a similar situation in a game, but I'm having issues coming up with a good formula.

If I have an object starting an an arbitrary point in 2d space (x,y), how can I calculate the trajectory angle needed in order to "throw" an object and ensure it lands at a second point in 2d space. In my scenario gravity is known, initial velocity is known, and the time it takes to get to the second point is irrelevant. I simply need to calculate the angle I need.

Any ideas?


Basically, you have a set of simultaneous equations, one for y-displacement and one for x-displacement, and you can solve for independently. You can break the initial velocity into x and y compoments dependent on the angle of fire.
 
  • #6
dsoltyka said:
Oddly enough, I came here to ask a similar question.

I'm trying to implement a similar situation in a game, but I'm having issues coming up with a good formula.

If I have an object starting an an arbitrary point in 2d space (x,y), how can I calculate the trajectory angle needed in order to "throw" an object and ensure it lands at a second point in 2d space. In my scenario gravity is known, initial velocity is known, and the time it takes to get to the second point is irrelevant. I simply need to calculate the angle I need.

Any ideas?

(Note that these formulas have the following assumptions: angles in degrees, distance in meters and that the acceleration of gravity is 9.8 m/s2)

Given the initial velocity Vi and the trajectory angle [itex]\alpha[/tex], you have horizontal and vertical components of the initial velocity:
Vix = Vi [itex]\times[/tex] cos([itex]\alpha[/tex]), Viy = Vi [itex]\times[/tex] sin([itex]\alpha[/tex])

Likewise, given the angle [itex]\beta[/tex] and distance D to the target, there is a horizontal and vertical displacement:
Dx = D [itex]\times[/tex] cos([itex]\beta[/tex]), Dy = D [itex]\times[/tex] sin([itex]\beta[/tex])

The time it takes for the projectile to cover the horizontal distance can be found by:
(1) t = [tex]\frac{D_x}{V_{ix}}[/tex]

The vertical offset over time t, can then be found by:
(2) Dy = [tex]V_{iy}\cdot t - 4.9 \cdot t^2[/tex]

In your case, the angle [itex]\alpha[/tex] is unknown and therefore, so are Vix and Viy, so substituting equation (1) into equation (2) gives us:
[tex]D_y = V_{iy} \cdot \frac{D_x}{V_{ix}}-4.9 \cdot \left( \frac{D_x}{V_{ix}} \right)^2[/tex]

[tex]D_y=\frac{V_{ix} \cdot V_{iy} \cdot D_x}{{V_{ix}}^2} - \frac{4.9 \cdot {D_{x}}^2}{{V_{ix}}^2}[/tex]

[tex]D_y=\frac{V_{ix} \cdot V_{iy} \cdot D_x - 4.9 \cdot {D_x}^2}{{V_{ix}}^2}[/tex]

[tex]D_y \cdot {V_{ix}}^2 = D_x \cdot V_{iy} \cdot V_{ix} - 4.9 \cdot {D_x}^2[/tex]

[tex]D_y \cdot {V_{ix}}^2 + 4.9 \cdot {D_x}^2 = D_x \cdot V_{iy} \cdot V_{ix} [/tex]

Squaring both sides, we get
(3) [tex]{D_y}^2 \cdot {V_{ix}}^4 \; + \; 9.8 \cdot D_y \cdot {D_x}^2 \cdot {V_{ix}}^2 \; + \; 24.01 \cdot {D_x}^4 = {D_x}^2 \cdot {V_{iy}}^2 \cdot {V_{ix}}^2 [/tex]

Now, we know that Vix2 + Viy2 = Vi2 and therefore Viy2 = Vi2 - Vix2

substituting into equation (3) gives us:
[tex]{D_y}^2 \cdot {V_{ix}}^4 \; + \; 9.8 \cdot D_y \cdot {D_x}^2 \cdot {V_{ix}}^2 \; + \; 24.01 \cdot {D_x}^4 = {D_x}^2 \cdot ({V_i}^2 \; - \; {V_{ix}}^2) \cdot {V_{ix}}^2 [/tex]

Multiplying out and rearranging, we have:
[tex]{D_y}^2 \cdot {V_{ix}}^4 \; + \; {D_x}^2 \cdot {V_{ix}}^4 \; + \; 9.8 \cdot D_y \cdot {D_x}^2 \cdot {V_{ix}}^2 \; - \; {D_x}^2 \cdot {V_i}^2 \cdot {V_{ix}}^2 \; + \; 24.01 \cdot {D_x}^4 = 0[/tex]

[tex]({D_y}^2 \; + \; {D_x}^2) \cdot {V_{ix}}^4 \; + \; (9.8 \cdot D_y \cdot {D_x}^2 \; - \; {D_x}^2 \cdot {V_i}^2) \cdot {V_{ix}}^2 \; + \; 24.01 \cdot {D_x}^4 = 0[/tex]

But, since Dx2 + Dy2 = D2, we have:
(4) [tex]D^2 \cdot {V_{ix}}^4 \; + \; (9.8 \cdot D_y \cdot {D_x}^2 \; - \; {D_x}^2 \cdot {V_i}^2) \cdot {V_{ix}}^2 \; + \; 24.01 \cdot {D_x}^4 = 0[/tex]

The equation (4) is a quadratic and Vix is the only unknown variable.

Remember that for quadratics of the form ax2 + bx + c = 0, we solve for x by using the quadratic formula:
[tex]x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}[/tex]

In your case,
[tex]x = {V_{ix}}^2[/tex]

[tex]a = D^2[/tex]

[tex]b = 9.8 \cdot {D_x}^2 \cdot D_y - {D_x}^2 \cdot {V_i}^2[/tex]

[tex]c = 24.01 \cdot {D_x}^4[/tex]


Solving the quadratic equation is easier done in parts: We already have determined a, b, & c. The value under the radical sign of the quadratic formula (b2 - 4ac) is known as the determinant. Let's call "d" the square root of the determinant. So now you'll have to solve for d:
[tex]d = \sqrt{b^2 - 4ac}[/tex]

and then plug the rest of the numbers into each of the following equations:

[tex]{V_{ix}}^2 = \frac{-b + d}{2a}[/tex] and
[tex]{V_{ix}}^2 = \frac {-b - d}{2a}[/tex]

and solve for [tex]V_{ix}[/tex] in each case.

Call the results [tex]V_{ix1}[/tex] and [tex]V_{ix2}[/tex]


Having solved for Vix, it is a simple matter to find the required trajectory angle (note that for all angles except 45 degrees, there exists two trajectory angles to reach your target - provided nothing is in the way of one or both of the calculated trajectories):

[tex]\alpha = cos^{-1}\left( \frac{V_{ix1}}{V_i} \right)[/tex]
or
[tex]\alpha = cos^{-1}\left( \frac{V_{ix2}}{V_i} \right)[/tex]
 
  • #7
zgozvrm said:
[tex]a = D^2[/tex]

[tex]b = 9.8 \cdot {D_x}^2 \cdot D_y - {D_x}^2 \cdot {V_i}^2[/tex]

[tex]c = 24.01 \cdot {D_x}^4[/tex]


Solving the quadratic equation is easier done in parts: We already have determined a, b, & c. The value under the radical sign of the quadratic formula (b2 - 4ac) is known as the determinant. Let's call "d" the square root of the determinant. So now you'll have to solve for d:
[tex]d = \sqrt{b^2 - 4ac}[/tex]

and then plug the rest of the numbers into each of the following equations:

[tex]{V_{ix}}^2 = \frac{-b + d}{2a}[/tex] and
[tex]{V_{ix}}^2 = \frac {-b - d}{2a}[/tex]

and solve for [tex]V_{ix}[/tex] in each case.

Call the results [tex]V_{ix1}[/tex] and [tex]V_{ix2}[/tex]


Having solved for Vix, it is a simple matter to find the required trajectory angle (note that for all angles except 45 degrees, there exists two trajectory angles to reach your target - provided nothing is in the way of one or both of the calculated trajectories):

[tex]\alpha = cos^{-1}\left( \frac{V_{ix1}}{V_i} \right)[/tex]
or
[tex]\alpha = cos^{-1}\left( \frac{V_{ix2}}{V_i} \right)[/tex]

As an example, suppose your target lies 100m away at an angle (alpha) of 36.8699 degrees uphill. Also, suppose your projectile is an arrow with an initial speed of 75 m/s. You need to find the angle of trajectory (beta) needed in order to hit the target.

So, we start with the following values:
D = 100
alpha = 36.8699
Vi = 75


First, we need to determine the horizontal and vertical offsets to our target:
Dx = D x cos(alpha) = 100 x cos(36.8699) = 80
Dy = D x sin(alpha) = 100 x sin(36.8699) = 60

Now, we can find a, b, c, & d:

[tex]a = D^2 = 100^2 = 10,000[/tex]
[tex]b = 9.8 \times {D_x}^2 \times D_y - {D_x}^2 \times {V_i}^2 = -32,236,800[/tex]
[tex]c = 24.01 \times {D_x}^4 = 983,449,600[/tex]

[tex]d = \sqrt{b^2 - 4ac} = 31,620,773.080998[/tex]


Solve for the 2 equations:

[tex]{V_{ix1}}^2 = \frac{-b + d}{2a}[/tex] and

[tex]{V_{ix2}}^2 = \frac {-b - d}{2a}[/tex]:



[tex]{V_{ix1}}^2 = \frac{-b + d}{2a} \approx 3192.8787[/tex]

and

[tex]{V_{ix2}}^2 = \frac {-b - d}{2a} \approx 30.8013[/tex]


Take the square roots:

[tex]V_{ix1} \approx 56.5056[/tex]

and

[tex]V_{ix2} \approx 5.5499[/tex]



Finally, determine the angles:

[tex]\alpha_1 = \cos^{-1} \left( \frac{V_{ix1}}{Vi} \right) \approx 41.1136^\circ[/tex]

and

[tex]\alpha_2 = \cos^{-1} \left( \frac{V_{ix2}}{Vi} \right) \approx 85.7563^\circ[/tex]
 

1. How do you calculate position on a trajectory?

The position on a trajectory can be calculated using the equation of motion, which takes into account the initial position, velocity, and acceleration of an object. This equation is: x = x0 + v0t + 1/2at2, where x is the final position, x0 is the initial position, v0 is the initial velocity, t is the time, and a is the acceleration.

2. What is the derivation of the equation of motion?

The equation of motion can be derived from the equations of kinematics, which describe the motion of an object in terms of displacement, velocity, acceleration, and time. By combining these equations and using the principle of calculus, the equation of motion can be derived as shown in the following steps:

  • Start with the equation for displacement: x = x0 + vt
  • Differentiate both sides with respect to time: v = dx/dt
  • Use the definition of acceleration (a = dv/dt) to substitute for v: v = v0 + at
  • Substitute this expression for v into the original equation and solve for x: x = x0 + v0t + 1/2at2

3. What is the significance of each term in the equation of motion?

The term x0 represents the initial position of the object, v0 represents the initial velocity, t represents the time, and a represents the acceleration. The term 1/2at2 is known as the acceleration component and represents the change in position due to the acceleration of the object.

4. How is the equation of motion used in real-world applications?

The equation of motion is a fundamental equation in physics and is used in many real-world applications, such as predicting the trajectory of a projectile, calculating the position of a moving object, and designing motion control systems.

5. Are there any limitations to the equation of motion?

The equation of motion assumes that the acceleration is constant over time, which is not always the case in real-world scenarios. Additionally, it does not take into account external forces or factors such as air resistance, which can affect the motion of an object. Therefore, it may not be accurate for all situations and may require adjustments or other equations to account for these factors.

Similar threads

  • Beyond the Standard Models
Replies
2
Views
827
  • Special and General Relativity
Replies
25
Views
405
Replies
3
Views
4K
Replies
1
Views
790
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
32
Views
1K
Replies
2
Views
759
  • General Math
Replies
11
Views
1K
Replies
1
Views
963
  • Astronomy and Astrophysics
Replies
2
Views
1K
Back
Top