What Causes the Sun's Unusual Orbital Path in a Java Solar System Model?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
whatisreality
Messages
286
Reaction score
1
I've written a java program to model the solar system. All my planets move in very well defined, stable orbits. The sun, on the other hand, is doing some very weird stuff. I've attached a plot of its path, a very zoomed in and a very zoomed out one. It isn't spiralling gradually inwards or outwards, as far as I can tell it's going in weird, wobbly loops. How do I explain that?! Especially as the rest of the planets work so well??

In my model, all bodies are point masses and have circular orbits, and they orbit around their common centre of mass.
 

Attachments

  • sun orbit3.jpg
    sun orbit3.jpg
    42.8 KB · Views: 507
  • sun orbit.jpg
    sun orbit.jpg
    29.5 KB · Views: 480
Astronomy news on Phys.org
All good! Adding Jupiter fixed it.