How do I scale the bodies so that they stay inside the 512-by-512 Turtle graphics window?
These are purely suggestions for how you might make progress. You do not have to follow these steps. • Review the Bouncing Ball program from lecture and the Student Precept List program from Section 2.5. • Copy the following files from /u/cs126/files/nbody into your working directory. It contains sample input files, Turtle.java, StdIn.java, and reference solutions. • Read in the data file planets.txt using StdIn.java, and print the information back out using System.out.println. • Now, read in the data file and store the information in several arrays. Let px[i], py[i], vx[i], vy[i], and mass[i] be real numbers which store the current position (x and y coordinates), velocity (x and y components), and mass of planet i. Let image[i] be a string which represents the filename of the GIF image used to display planet i. Print the information back out. • Step 3. Plot the background starfield.jpg image. Recall that Turtle.spot centers the image at the current location, so use Turtle.fly to pre-p