Newtonian Equations of Motion (Looks easy)

In summary: Your Name]In summary, Tim is seeking help with a computer game he is developing. He needs to determine the angle to point a spaceship in order for it to accelerate towards a target, then turn and accelerate away to come to a stop at the target. He provides equations of motion and initial values, but is unsure how to solve for the desired accelerations in the x and y directions. A suggested approach is to set up trial values for the times at which the acceleration is reversed, then use the equations to solve for the desired accelerations and adjust the trial values as needed.
  • #1
TimLeslie
1
0

Homework Statement



Hi Guys,

I am hopeful someone here may be able to help with this but if people think this should be on a different forum please let me know and I'll move it.

I am writing a computer game and I am currently working on the computer controlled player. The player is a spaceship which can turn to face any direction and accelerate at a constant acceleration in the direction it is facing. The velocity vector can be totally different to the direction of acceleration. I want the player to accelerate towards a target (known x and y) and then turn around and start accelerating away from it so that it comes to a stop at the target. I want to know what angle to point the ship in. This would be straight towards the target if the ship was standing still but when the ship has an initial velocity this it is not so simple.

I know:

The acceleration (a)
The initial velocity in x (Vx)
The initial velocity in y (Vy)
The distance to the target in x (Dx)
The distance to the target in y (Dy)

I need to know:

The desired acceleration in x (Ax)
The desired acceleration in y (Ay)

such that when the acceleration in x is reversed at time t1x (not known) and reversed in y at time t1y (also not known) the spaceship will come to rest at the target.


Homework Equations



The magnitude of the total acceleration is a constant so:
Ax^2 + Ay^2 = a^2

I found these equations of motion useful but I have not solved this problem!
s=ut+(1/2)at^2
v=u+at

The Attempt at a Solution



Right, I started by thinking about the 1 dimensional problem:

1.) At time t1 (the moment when the acceleration is reversed) the velocity is at a maximum (Vm).

2.) We know that s1 + s2 = D where s1 is the distance traveled between the start time (t0) and t1 (when the direction is reversed), s2 is the distance traveled between t1 and the time when the player comes to rest (t). I also use t2 which equals t - t1

3.) Using the equations of motion v=u+at and s=ut+(1/2)at^2 combined with (1) and (2) you know the following system of equations hold:

(eq1.) Vm = V + (A * t1)
(eq2.) Vm = A * t2
(eq3.) s1 = (V * t1) + (0.5 * A * t1^2)
(eq4.) s2 = (0.5 * A * t2^2)
(eq5.) D = s1 + s2

where V is the initial velocity, A is the acceleration and D is the distance to the target.

From this it can be shown that (I am reasonably sure about this bit):
(A*(t1^2)) + (2*V*t1) + ((V^2)/(2*A) - D = 0

using the quadratic equation you can then find t1 for a given A. Whoop! :-)

Then it is possible to find t (the total time) by using:
(eq1 = eq2):: V + (A * t1) = A * t2
t1 + t2 = t
so: t = (V/A)+2t1

All good so far. Hope you are all still following :-).

The problem is we don't know A in the two dimensional problem. What we do know is:
Ax^2 + Ay^2 = a^2
and:
tx = ty

can anyone tell me what Ax or Ay should equal in order that these two equations satisfy?

I am not above using an iteration but I can't find one which reliably converges. The iteration I used was:

(new Ax) / (new Ay) = ((old Ax) / (old Ay)) * (tx / ty)
combined with (new Ax)^2 + (new Ay)^2 = a^2

but this doesn't work.

Any other suggests on how to tackle this problem would also be appreciated. I have a physics degree but it was a long time ago and I have forgotten most of it! However I'm sure I can still manage most calculus.

Thank you brainiacs!
Tim

P.S. I hope this is within the remit of this forum. If it is not any suggestions of where I might post it would be enormously appreciated.
P.P.S. I use the programming notation: ^ == to the power of, * = = times, / == divid
 
Physics news on Phys.org
  • #2


--------------------------------------------------

Hi Tim,

I am a scientist and I have some ideas that may help you with your problem. First, let's define some variables:

Ax = desired acceleration in the x-direction
Ay = desired acceleration in the y-direction
a = total acceleration (constant)
Vx = initial velocity in the x-direction
Vy = initial velocity in the y-direction
Dx = distance to the target in the x-direction
Dy = distance to the target in the y-direction
t1x = time at which the acceleration is reversed in the x-direction
t1y = time at which the acceleration is reversed in the y-direction
t = total time

Using the equations of motion you provided, we can set up the following system of equations:

(eq1) Vx + Ax*t1x = Ax*t
(eq2) Vy + Ay*t1y = Ay*t
(eq3) Dx = Vx*t + (1/2)*Ax*t^2
(eq4) Dy = Vy*t + (1/2)*Ay*t^2
(eq5) Ax^2 + Ay^2 = a^2

We have five equations and five unknowns (Ax, Ay, t1x, t1y, t), so we should be able to solve for all of them. However, the problem is that we don't know the values of t1x and t1y. To solve for them, we can use the following approach:

1. Set up a trial value for t1x and t1y (for example, t1x = t1y = t/2).
2. Use the equations (eq1) and (eq2) to solve for Ax and Ay.
3. Use the equations (eq3) and (eq4) to check if the values of Ax and Ay are correct. If they are not, adjust the trial values of t1x and t1y and try again.
4. Once you have found the correct values of Ax and Ay, use them to solve for t1x and t1y.
5. Finally, use the equations (eq1) and (eq2) to determine the total time t.

I hope this helps. Let me know if you have any further questions or if this approach does not work for you. Good luck with your game!

 

1. What are Newton's three equations of motion?

The three equations of motion are:
1. First equation of motion (also known as the Law of Inertia): F = m * a
2. Second equation of motion (also known as the Law of Acceleration): a = (Vf - Vi)/t
3. Third equation of motion (also known as the Law of Action and Reaction): F1 = -F2

2. What is the significance of the constant "g" in Newton's equations of motion?

The constant "g" represents the acceleration due to gravity on Earth, which is approximately 9.8 m/s^2. It is a constant value used in the equations to calculate the effect of gravity on objects.

3. Can Newton's equations of motion be applied to all types of motion?

Yes, Newton's equations of motion can be applied to all types of motion, including linear, circular, and rotational motion. However, they are most commonly used for linear motion.

4. How are Newton's equations of motion related to each other?

The three equations of motion are interrelated and build upon each other. The second equation is derived from the first equation, and the third equation is derived from the second equation. Therefore, all three equations are necessary for a complete understanding of an object's motion.

5. Can Newton's equations of motion be used to predict an object's future motion?

Yes, Newton's equations of motion can be used to predict an object's future motion as long as the initial conditions (such as initial velocity and acceleration) are known. By plugging in these values into the equations, we can calculate the object's position, velocity, and acceleration at any given time in the future.

Similar threads

  • Introductory Physics Homework Help
Replies
2
Views
873
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
327
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
30
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
797
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
718
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
594
Back
Top