landgreen / landgreen.github.io

Landgreen's public site: physics notes, n-gon
https://landgreen.github.io/
GNU General Public License v3.0
150 stars 42 forks source link

Gravity radius fudge factor reduces energy #4

Closed rmmh closed 6 years ago

rmmh commented 6 years ago

Adding a constant factor to radius introduces error-- which is why the orbits under Circular Orbits don't trace ellipses.

const r = Math.max(dx * dx + dy * dy, 1) would avoid both degenerate zero-radius cases and introducing error.

landgreen commented 6 years ago

I wish I had read this a few days ago. It took me a while to determine this fudge factor was the cause of the precession, but I figured it out a couple days ago. thanks!