Solving for the Direction of a Force

  • Context: Undergrad 
  • Thread starter Thread starter Nightshade8
  • Start date Start date
  • Tags Tags
    Direction Force
Click For Summary

Discussion Overview

The discussion revolves around solving for the direction of a force applied to an object in a 2-dimensional physics engine, specifically in the context of a game involving telekinesis. Participants explore methods to determine the angle at which an object should accelerate to reach a target point (the cursor) while considering initial velocity and other forces acting on the object.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant describes the need to account for initial velocity and other forces when calculating the angle of acceleration for the telekinetic force.
  • Another participant proposes a set of equations to model the motion of the object, including the effects of various forces and initial conditions.
  • A different participant mentions the complexity of the problem, indicating that they have also struggled to find a solution and shares their own work.
  • One participant suggests using a bisection method to solve a fourth-degree polynomial equation derived from the motion equations, emphasizing the need to find the correct time for the object to reach the target.
  • Another participant agrees on the difficulty of solving the fourth-order system and recommends using a mathematical software package or numerical solver for assistance.

Areas of Agreement / Disagreement

Participants generally agree on the complexity of the problem and the challenges associated with solving it. However, there are multiple competing approaches suggested, and no consensus on a definitive solution exists.

Contextual Notes

The discussion highlights the limitations of the proposed methods, including the unresolved nature of the fourth-degree polynomial equation and the dependence on various assumptions regarding forces and initial conditions.

Nightshade8
Messages
2
Reaction score
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
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.
 
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:
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.
 
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.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 41 ·
2
Replies
41
Views
5K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 40 ·
2
Replies
40
Views
8K