Split gravitational force into x, y, and z componenets

In summary: Here's how I think I might be able to solve it (keep in mind that this is based on a decent amount of math but only one year of high-school level physics).In summary, the student is trying to solve for the force in three dimensions between two bodies. He knows how to solve for the force in two dimensions, so he can split the force up into two triangles and solve for the leg lengths of the second triangle. He thinks this should work, but he has no means to test it.
  • #1
RossH
75
0
Hi. I'm not really all that knowledgeable about physics, so I'm sorry if the answer to this is obvious.

Homework Statement


I am writing a program for a computer science class in which I am doing an n-body simulation in 3-dimensional space. Currently, I have figured out the gravitational force along the hypotenuse between two bodies. Now I have to split these up into the x, y, and z components, and this is where I am having trouble.

Homework Equations


Force between two objects (force_t)=G*m1*m2/r^2
Typically, force_x=force_t*cos(angle between x-axis and hypotenuse)
force_y=force_t*sin(angle between x-axis and hypotenuse)

The Attempt at a Solution



So, I can figure out my triangle. I know that my two bodies are located at (x1, y1, z1) and (x2, y2, z2), so I have my triangle. And I am fairly certain that the above equations will hold for x and y, even though I'm in three dimensions, but I'm just not sure what the corresponding equation for the z component will be. My thought was that the combination of the three forces has to equal the total force, so perhaps I solve for the z component algebraically using the pythagorean theorem, but I have no way to check whether or not this is true.

Anyway, any help would be appreciated. Thanks!
 
Physics news on Phys.org
  • #2
How much vector mechanics have you studied?
 
  • #3
SteamKing said:
How much vector mechanics have you studied?

None. I've had a little linear algebra if that's related. I'm a computer science major with a minor in math.
 
  • #4
It's difficult to explain so much in a forum like this. Have you sought assistance from someone studying physics?
 
  • #5
SteamKing said:
It's difficult to explain so much in a forum like this. Have you sought assistance from someone studying physics?

That's a good idea. I'll look into it. Do you know of any site that explains this? I've been googling for a site that explains the math in-depth, but have had no success.
 
  • #6
If I am not mistaking I think you can just orient the coordinate system so the force is along one axis. I don't know any CS though.
 
  • #7
khemist said:
If I am not mistaking I think you can just orient the coordinate system so the force is along one axis. I don't know any CS though.

That would be problematic because in the libraries that I am using to write this program I have a static coordinate system, and the forces and direction of forces are dynamic, since I'm doing an n-body simulation. Unless you know of a way that I can recalculate the coordinate system? The programming isn't a problem; it's just the math that's giving me grief.
 
  • #8
Here's how I think I might be able to solve it (keep in mind that this is based on a decent amount of math but only one year of high-school level physics).

I am trying to split up a force vector in a 3-dimensional space into three components, and I definitely have enough information to solve for all triangle side lengths with no trouble.

I already know how to solve for the force in 2-dimensions. Fx=cos(theta)*F_total and Fy=sin(theta)*F_total, where theta is the angle of incidence with the x-axis.

Therefore, I can split this into two triangles. One will be a triangle in the x-y plane and one will be a triangle in the x-y-z space. The hypotenuse of the triangle in the x-y plane will be one leg of the triangle in x-y-z space.

To picture this: a square room. One triangle is made by the line from one corner on the floor of the room to the corner farthest from it on the ceiling. Another triangle is the half of the room that is on the floor, connecting to the third side of the first triangle.


Then, I can easily solve for the leg lengths of the second triangle. Therefore, if I use the typical math described above to find the force on each of the legs of the original triangle, I can use this information to find the force in one direction and then a second force, which will be the combination of the x-y force.

I can use x-y force with the second triangle described above and split it up into its components to find the individual forces that are in this triangle.

I think that this should work, but obviously I have no means to test it. Does this sound alright to you? Obviously it's rough. Sorry, I couldn't find a good picture online to describe what I mean by two triangles.
 

1. How is the split gravitational force calculated?

The split gravitational force is calculated by breaking down the total force into its x, y, and z components using the equations Fx = Fcosθ, Fy = Fsinθ, and Fz = F, where θ is the angle of the force vector with respect to the x-axis.

2. What are the x, y, and z components of gravitational force?

The x, y, and z components of gravitational force represent the amount of force acting in the respective directions. The x component is the force acting in the horizontal direction, the y component is the force acting in the vertical direction, and the z component is the force acting perpendicular to the x-y plane.

3. Why is it important to split gravitational force into x, y, and z components?

Splitting gravitational force into x, y, and z components allows us to analyze the effects of gravity in different directions. This is especially useful in complex systems where the force of gravity may be acting in multiple directions.

4. Can the split gravitational force be negative?

Yes, the split gravitational force can be negative. This occurs when the angle θ is greater than 90 degrees and the x or y components are negative.

5. How does split gravitational force affect an object's motion?

The split gravitational force affects an object's motion by determining the direction and magnitude of the force acting on the object. This can impact the object's acceleration and ultimately its motion.

Similar threads

  • Introductory Physics Homework Help
Replies
4
Views
199
  • Introductory Physics Homework Help
Replies
5
Views
802
  • Introductory Physics Homework Help
Replies
2
Views
853
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • Introductory Physics Homework Help
Replies
7
Views
524
  • Introductory Physics Homework Help
Replies
28
Views
1K
  • Introductory Physics Homework Help
Replies
18
Views
800
  • Introductory Physics Homework Help
Replies
11
Views
1K
  • Introductory Physics Homework Help
Replies
11
Views
1K
  • Introductory Physics Homework Help
Replies
5
Views
921
Back
Top