Solving for the Direction of a Force

In summary, the conversation discussed a difficulty in controlling objects with telekinesis in a 2-dimensional physics engine, and the need for a method to calculate the angle at which the object should accelerate. Various equations and approaches were suggested, including using a math package like Mathematica or a numerical solver to solve the 4th degree polynomial equation.
  • #1
Nightshade8
2
0
Hello, everyone. I've been working with this physics problem for about a week without much success, and this looked like a good place to get some help.

Here's the issue. I'm programming a game where the main character has the ability to move objects with telekinesis (by applying a constant force). It uses an entirely 2-dimensional physics engine.

However, it would be very difficult to control the objects if they accelerated directly towards the cursor. If the object had an initial velocity before the force was applied, or if there was some other force acting on the object (namely gravity), it would end up arcing around the cursor. I want to develop a system where the object accelerates at a specific angle so that it passes directly through the cursor.

I need a method to solve for the angle the object should accelerate at when under the control of the telekinesis. The magnitude of this force, the angle and magnitude of the object's current velocity, the angle and magnitude of the sum of all other forces, and the horizontal and vertical distances that must be covered are all known constants that would need to be entered into the equation.

You can see my work here (hopefully you can read it):
http://img178.imageshack.us/img178/8269/tempyr6.png
The three circled equations near the bottom are as far as I could go before I got stuck. Even my graphing calculator wasn't able to solve for theta.

Hopefully you understood all that. If you have any suggestions for how to solve this, please tell me. I'm running out of ideas.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
This is the approach I would take:

x = 1/2 (Fxo/m + Fx/m) t^2 + vxo t + xo
y = 1/2 (Fyo/m + Fy/m) t^2 + vyo t + yo
Fx^2 + Fy^2 = F^2

where m is the object mass, (x,y) is the cursor location, (Fxo,Fyo) is the sum of all of the other forces, (Fx,Fy) is the telekenisis force, F is the magnitude of the telekenesis force, (vxo,vyo) is the initial velocity, (xo,yo) is the initial position, and t is the time at which the object reaches the cursor. You have three unknowns, Fxo, Fyo, and t, and three equations.
 
  • #3
That's easier said then done. I've tried using another route to solve this problem, but still ended up getting stuck.

You can see my work here:
http://img2.freeimagehosting.net/uploads/1823d86e2d.png
 
Last edited by a moderator:
  • #4
I have an idea, but it involves bisection or some other way of solving a 4-th degree polynomial equation (of a single variable).

1. Write the distance between object and goal s(t) as a function of time, if you chose to
apply no force (except natural forces).

2. The area your object can reach is the circle with radious a*t*t/2 around the point where object would be without artificial force. This means that the shortest time t when your object can reach it's aim is the time when that circle touches aimed point. The equation for t is:

s(t)=a*t*t/2

This equation is polynomial, 4-th degree. I read formula exists, but it is ugly. But you can
use bisection, since
s(t)>a*t*t/2 for too large t
s(t)<a*t*t/2 for too small t

After you find the right t, direction of force is simply the direction between point where object would be (at time t) without force and the aimed point.
 
  • #5
Yes, this is much easier said than done. As Lojzek mentioned the system that you are trying to solve is 4-th order. I would not even attempt its solution by hand. You should either use a math package like Mathematica or you should use a numerical solver.

Just for grins I plugged the system into Mathematica, it came up with 4 roots, each of which was hundreds of pages long.
 

1. What is the definition of "solving for the direction of a force"?

Solving for the direction of a force refers to determining the exact direction in which a force is acting on an object. This is an important aspect of understanding the motion and behavior of objects in physics.

2. Why is it important to solve for the direction of a force?

Knowing the direction of a force is crucial in understanding the overall motion and behavior of an object. It can also help in predicting the future motion of the object and determining the amount of work done by the force.

3. What are the different methods for solving the direction of a force?

There are several methods for solving the direction of a force, including using vector diagrams, trigonometry, and the use of equations such as Newton's Second Law and the Pythagorean Theorem.

4. Can the direction of a force change?

Yes, the direction of a force can change depending on the angle at which it is applied or due to the motion of the object. It is important to consider any changes in direction when solving for the overall force acting on an object.

5. How does solving for the direction of a force relate to other concepts in physics?

Solving for the direction of a force is closely related to other fundamental concepts in physics, such as velocity, acceleration, and momentum. Understanding the direction of forces acting on an object is crucial in analyzing its overall motion and behavior.

Similar threads

Replies
75
Views
2K
  • Classical Physics
2
Replies
41
Views
2K
Replies
7
Views
763
  • Classical Physics
Replies
11
Views
827
  • Classical Physics
2
Replies
40
Views
4K
Replies
16
Views
939
  • Classical Physics
Replies
14
Views
758
  • Classical Physics
2
Replies
47
Views
2K
  • Classical Physics
Replies
17
Views
987
  • Classical Physics
Replies
1
Views
937
Back
Top