#include #include #include #include #include #define N 2 #define D 2 #define PI 3.1415926535897932384626433832795028841971693 double x[N][D],v[N][D]; // state of the system double dt=0.01,G=1,m[N],x0[N][D],v0[N][D]; int ItNo=1; int iterations=0, lastit=-1; int r=10; double tet=0,omega=0,fact=0.3; // data for the traces #define LTmax 1000 int c[N]; int LT=LTmax; double trace[N][LTmax][D]; void FF(double F[N][D],double x[N][D]){ for (int i=0; i