Breaking down forces in three dimensions.

  • Thread starter Thread starter Yevgeni
  • Start date Start date
  • Tags Tags
    Dimensions Forces
AI Thread Summary
The discussion focuses on programming a space simulator, specifically addressing the challenge of accurately implementing gravitational forces in three-dimensional space. The user has successfully calculated the net force between two objects but seeks guidance on breaking these forces down into Cartesian coordinates. They reference the classical law of gravitation, expressing the force as vectors in three dimensions. A point of confusion arises regarding the inverse square versus inverse cube relationship in gravity, which is clarified by noting that the inverse square law still applies when considering direction. The user plans to implement these calculations and share results regarding stable orbits in their simulator.
Yevgeni
Messages
2
Reaction score
0
Hello! This is my first post but definitely not my last.

I am programming a space simulator and my first problem to solve is to make gravitation work properly.

If I have two objects at arbitrary positions in three dimensional space I can calculate the net force between them in a straight line, but that does me no good for a Cartesian coordinate system. How do I break the forces down into three axes? I have found how to do this with two axes, but I can't apply this logic to three for some reason. Once I solve this problem I will put a "star" and a "planet" into my simulator and let you all know if I can make a stable orbit with this solution.
 
Physics news on Phys.org
The classical law of gravitation is F=G m1 m2 R/|R|^3 where F and R are vectors, so you represent them as F=[Fx, Fy, Fz] and R=[Rx, Ry, Rz]. F is the force on particle 1 (or 2) and R is the vector from particle 1 (or 2) to particle 2 (or 1). |R| is the absolute value of R which equals sqrt(Rx^2+Ry^2+Rz^2). So you really have three equations:

Fx = G m1 m2 Rx/|R|^3
Fy = G m1 m2 Ry/|R|^3
Fz = G m1 m2 Rz/|R|^3
 
This is exactly what I was looking for! I'm slightly confused, though. Isn't gravitation an inverse square relationship as opposed to inverse cube relationship?

At any rate, I'll plug this into my program and let you know my results.
 
Calculate the magnitude of that vector and see what you get. :smile:
 
Yevgeni said:
This is exactly what I was looking for! I'm slightly confused, though. Isn't gravitation an inverse square relationship as opposed to inverse cube relationship?

At any rate, I'll plug this into my program and let you know my results.

This is still inverse square, there is that R on top too. Its just that you have to specify the direction too, and to do that you multiply by R/|R| which is just one unit long
 
Thread 'Question about pressure of a liquid'
I am looking at pressure in liquids and I am testing my idea. The vertical tube is 100m, the contraption is filled with water. The vertical tube is very thin(maybe 1mm^2 cross section). The area of the base is ~100m^2. Will he top half be launched in the air if suddenly it cracked?- assuming its light enough. I want to test my idea that if I had a thin long ruber tube that I lifted up, then the pressure at "red lines" will be high and that the $force = pressure * area$ would be massive...
Back
Top