Plot all points in orbits, putting their xy coords in an arrayĬalc the force vector pulling on them from the parent (prop to mass, inverse prop to sqaure of dist)įrom the force, calc the change in velocity.ĭo this for all point, then update the display and repeat. I have tried searching on the net, but have just got more confused. I hope that someone here will be so kind to explain me the theory of doing such a simulation or tell me where I can find books, documents, or websites about it. I know Newton laws of gravity, but I do not understand how to apply them to a simulation, and when I fool around with the formulas I manage to get different results depending on how I interpreted applying the formulas to a simulation. I know that there are plenty of others programs that can do such simulations, but I wish to know the theory and math behind it so that I can build my program from ground up. I want to build my programs on Newtons laws. I only know high-school level physics but I know university level mathematics. I'm about to write a java program where I wish to simulate planets orbit curve around the sun, so that I can set the speed of a planet and mass of planet and sun and simulate the curves around the sun (just basic simulations). How to simulate planets orbit curve around the sun ?
0 Comments
Leave a Reply. |