How to add eccentricity to Kepler's Laws in cartesian

AI Thread Summary
The discussion centers on developing a three-body simulator with elliptical orbits by incorporating eccentricity into Kepler's laws, while using Newton's Law of Gravitation for position plotting. It highlights that Kepler's laws are not applicable for systems with more than two bodies, and there is confusion regarding the concept of eccentricity within Newton's framework. The user is coding in Fortran95 due to academic requirements but is open to learning other programming languages for future projects. They seek advice on live plotting results and inquire about using Python or Java to visualize data written to a .dat file. Participants suggest that there are libraries available in these languages to facilitate live plotting, while also expressing a preference for languages like Python or C++ over Fortran for better coding practices.
AlphaBetaGamma96
Messages
3
Reaction score
0
Hi,

I'm currently making a three-body simulator and I'm trying to add the eccentricity to Kepler's Law to turn the circular orbits to more of a elliptical orbit? I'm using Newton's Law of Gravitational to plot the new positions. How would I add in the eccentricity to this equation? I'm currently coding it in Fortran95
 
Technology news on Phys.org
Kepler's laws do not apply to problems with more than two bodies. They can be some reasonable approximation in some cases but in general they do not work.
AlphaBetaGamma96 said:
I'm using Newton's Law of Gravitational to plot the new positions.
Newton's laws do not have any notion of eccentricity, so where is the problem?
AlphaBetaGamma96 said:
I'm currently coding it in Fortran95
Do you have to use Fortran? If not, try to avoid it.
 
  • Like
Likes AlphaBetaGamma96
Do you have to use Fortran? If not, try to avoid it.[/QUOTE]

Thanks for the reply! I'm currently doing a Computational Project at the moment for my degree. We are allowed to use any computational language, but I've only been taught in Fortran95. I'm considering learning another language at some point down the line, any recommendations? I'm trying to live plot the results so it can be seen as more of an animation.

The program writes out the points to a .dat file, could I then call this file to say a program in Python or Java and then live plot it?

(Sorry for kinda sidetracking from the initially stated question)

Thank you for your time! :D
 
AlphaBetaGamma96 said:
I'm considering learning another language at some point down the line, any recommendations?
Python is nice, Java is interesting, C++ has some advantages as well.
Fortran is just messy.
AlphaBetaGamma96 said:
The program writes out the points to a .dat file, could I then call this file to say a program in Python or Java and then live plot it?
There should be libraries or even whole programs to do that.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top