Live data from Hacker News

Gravity Simulator

nowykurier.com

131–135 of 135 posts

Re: Gravity Simulator

#131
post #127

Does anyone know why perihelion moves in this simulation? I learned that perihelion movement can only be explained by general relativity, not newtonian mechanics. Is this just a limit of computer simulation? (which can't calculate the exact value of Gm1m2/r^2)

It is a shortcoming of the integrator (Euler), not in the calculation of the force (as you suspected). See [1]. Especially slides 11 and 12 may be of interest. [1] http://www.astro.sunysb.edu/phy277/lect30.pdf As a sidenote, there are better integration schemes, but all of them will have some error because we discretize the system.

Wow that is really interesting. Thanks. By the way, if there are always some error in all systems, then what kind of systems are used by NASA or other space exploration institutes?

Re: Gravity Simulator

#132
post #95
post #87

Love this. I managed to get a pretty stable orbit by using the right angle and velocity (by chance). Highlighted in yellow: http://i.imgur.com/OOaTLMP.png

This is the coolest trajectory found on this thread for now!!!!

It ran for several hours like that and never deviated from the original "circular" path. Unlike the other attempts, which were all much more elliptical. I guess that's kind of how planets would stay in a stable orbit though, having the right distance and speed for their mass.

Re: Gravity Simulator

#134

Wow this is fun. But it has so much potential for improvements! -Saving your setting -Undo-ing -Auto generate small object in perfect circle orbit around larger object, and generate sun-earth-moon system -Export setting to other people -Allow to numerically finetune locations and velocities -Don't ruin the trails when dragging -Make it run faster, especially with trails enabled -etc... :) EDIT: Gee, when will Hacker…

I would like to name individual "bodies," the ability to zoom in and out, and maybe even a mathematical readout of some sort. The values behind trajectory, etc.

Re: Gravity Simulator

#135
post #127

Earlier quoted context omitted.

It is a shortcoming of the integrator (Euler), not in the calculation of the force (as you suspected). See [1]. Especially slides 11 and 12 may be of interest. [1] http://www.astro.sunysb.edu/phy277/lect30.pdf As a sidenote, there are better integration schemes, but all of them will have some error because we discretize the system.

Wow that is really interesting. Thanks. By the way, if there are always some error in all systems, then what kind of systems are used by NASA or other space exploration institutes?

I'm not in the business of space mission engineering, so I don't know details. Sorry.

But in general, you can control the error and make a trade-off between computing time and accuracy. You would select a timescale over which you want the error to be below some value, and then only consider the simulation valid until then.

Post reply on HN