Gravity Simulator 2D: Calculating Trajectories

AI Thread Summary
Creating a 2D gravity simulator involves simulating a large body, like a planet or sun, and smaller objects such as comets or asteroids. The gravitational force formula is essential, and understanding how to calculate trajectories based on speed and angle of approach is crucial for determining whether smaller objects will crash, pass by, or enter orbit. The equations of motion, including the transformation to x and y coordinates, are necessary for accurate simulations. Initially, the influence of the smaller body on the larger can be ignored, simplifying calculations. This foundational knowledge is key to developing an effective gravity simulation.
Pink panther
Messages
1
Reaction score
0
I want to create a simple 2d Gravity simulator where I have a large body i.e. A circle which could be a planet or the sun. I then want to simulate small comets or asteroids traveling past it, crashing into or being pulled into orbit. I know the gravitational force formula but that seems the simple part. What I want to know is how to calculate the trajectories for objects flying past. I guess speed and angle of approach determine whether a smaller object will crash, go past or go into orbit around the larger body. Any explanations or sources would be appreciated.
 
Physics news on Phys.org
Hello Pinky, :welcome:

Your gravitational force formula is most likely something like ##\vec F = - {GMm\over |\vec r|^2} \, \hat r##. The equation of motion is ##\vec F = m\vec a## where ##\vec a = {d\vec v \over dt}## and ##\vec v = {d\vec r \over dt}##.
If you want it in x, y coordinates you will need a coordinate transformation at some suitable moment.
That's really all there's to it !

Things become more complicated if you want to can no longer ignore the influence of the smaller m on the big M. Maybe that comes later; for now I interpret your large/small as a permit to ignore the motion of the large body.​
 
I think it's easist first to watch a short vidio clip I find these videos very relaxing to watch .. I got to thinking is this being done in the most efficient way? The sand has to be suspended in the water to move it to the outlet ... The faster the water , the more turbulance and the sand stays suspended, so it seems to me the rule of thumb is the hose be aimed towards the outlet at all times .. Many times the workers hit the sand directly which will greatly reduce the water...
I don't need cloth simulation. I need to simulate clothing meshes. Made of triangles and I need an answer that someone with High School math can understand. I am actually using the time it takes for someone to answer to create a model with less geometry than the one I have been using. I want clothing that can be removed on a model that will be animated. I don't need stretching or wrinkles on my meshes, I just need gravity. I have an idea of how I could do it, but I don't know how to apply...
Back
Top