java help (only loops)?

I have teh following loop (which is currently wrong):
double m = input.nextDouble();
double step = t/m;
for (double i = 0; i < t; i+=step)
{
System.out.print(t);
for(double j = 0; j < v; j+=step)
{
occurrence.calcVelocityf(v, g, t);
v = occurrence.getVelocityf(v, g, t);
System.out.print(v.returnString() + "\t");

}

I.e. initial values the user enters e.g. at t = 0, v = (1,0,0), t = step v = (final v at t = 0), t = 2step v = (final v at t = step), t = 3step v = (final v at t = 2step)…
The difficulty i believe is getting the velocity bit correct as it is of a vector class type.

Here are my files if you require more exploration with the first containing this and the order i consider important to you.
http://dl.dropbox.com/u/48169762/GravSim.java
http://dl.dropbox.com/u/48169762/PhysicsVector.java

(You shouldn't need these:)
http://dl.dropbox.com/u/48169762/Projectile.java
http://dl.dropbox.com/u/48169762/GravField.java

thanks


More on hypeanswer.com

    More on Wikipedia

    Answers

      News