Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a Java application that simulates a minimum of 3 spheres moving through a

ID: 3527602 • Letter: C

Question

Create a Java application that simulates a minimum of 3 spheres moving through a frictionless environment with gravity. The environment should be a confined cube area for the spheres to collide and respond to collisions. The application must display the positions of the spheres in real time. In addition, the 3D vector position of each sphere should be saved once every second for future plotting and simulation replay. The initial position and velocity for each sphere should be random, but constrained, each time the application is run. The camera should be positioned to see the entire cube environment, but it does not have to be adjustable by the user.

Explanation / Answer

Posted 20 February 2011 - 06:42 PM

1 if (temp.length() <= r1 )