Thanks FJacq
It turns out that you were right in both cases. I ended up getting it to plot and everything now. As well as implementing an array for my timesteps to allow for far more accuracy. It now simulates the orbit correctly, conserves energy, works. My next step will be moving from this...
So I am having trouble getting this program to work.
I have all of my variables declared and what not, the issue seems to be that when I run the program, the "star" just drifts with an always increasing acceleration continuously away, so the energy of the system is not conserved, as it should...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.