Exemplo n.º 1
0
 public void SetCurrent(double dt,Point3D f,double t)
 {
     var c  = current;
     var v  = currentV;
     newPos = c + v * dt;
     newV   = v + f * dt;
     newF   = f;
 }
Exemplo n.º 2
0
 internal void Commit()
 {
     current = newPos;
     currentV = newV;
     currentF = newF;
     ++i;
     if (i%1000==0)
     {
         track.Add(current);
         forces.Add(currentF);
         velocity.Add(currentV);
     }
 }
Exemplo n.º 3
0
 public Body(Point3D start, Point3D vel,string n, double m)
 {
     name = n;
     track.Add(start);
     velocity.Add(vel);
     forces.Add(Point3D.Zero);
     mass = m;
     startP = start;
     startVel = vel;
     current = start;
     currentV = vel;
     currentF = Point3D.Zero;
 }