public class ProjectileSimulatorExample { public static void main (String[] argv) { // Make a new simulator object. ProjectileSimulator proSim = new ProjectileSimulator (); // We want to plot d vs. t Function dist = new Function ("distance"); for (double t=0.1; t<=2.3; t+=0.1) { // mass=1, angle=37, initVel=20 double d = proSim.run (1, 37, 20, t, 0.0001); dist.add (t, d); // Use s = 0.01 to get distance at t+s } // Display. dist.show (); } }