mgiddy911 said:
I'm an undergrad student, first year in Theoretical Physics / Applied Maths, I have taken 2 years of java in Highschool, I would really like to pursue advanced programming with java and physics together. If anyone has any resources I'd gladly appreciate them. I know that most of you said you work in a C language or Fortran, but I would like to try my luck at writing programs for physics with java
You might want to look at these books, which complement each other nicely.
Java Number Cruncher: The Java Programmer's Guide to Numerical Computing
https://www.amazon.com/gp/product/0521821134/?tag=pfamazon01-20
In order to teach myself some Java, I have developed an interactive animation that shows orbits (timelike geodesics parametrized by proper time) about Schwarzschild black holes. The program numerically solves differential equations, computesdefinite integrals, finding roots, and plots the results graphically.
The animation takes as input from the user the initial r coordinate, and the initial speed and angle with respect to an orthonormal frame of a platform hovering (and experiencing an incredibly large "g-force") at that r value.
The animation sits in a frame in a bunch of hyperlinked html files. These files contain a number of short explanations and write-ups for some suggested virtual experiments that can be performed with the package.
Experiment 1: Falling Into a Black Hole
Experiment 2: Escape Velocity
Experiment 3: Investigation of Stable Circular Orbits
Experiment 4: Investigation of Unstable Circular Orbits
Experiment 5: Investigation of Spiral Orbits
Experiment 6: Gravity Bends Light Rays!
Experiment 7: Boundaries Between Orbits of Various Kinds
Experiment 8: Orbital Precession and Closed Orbits
I've had a lot of fun (and some frustrations) developing and playing with the package. I have attached a zipped file that contains all the necessary files. To use the animation, unzip the zipped file, making sure that all files are extracted into the same folder. (A new folder should probably created before doing this.) Click on the file blackHoleOrbits.html to view and interact with the animation.
The animation is certainly not at a professional level, and it has glitches and warts.
I posted this a couple of years ago, but I think I have fixed one of the minor glitches.