diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3b66410 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/lib/plots.py b/lib/plots.py index 42f8b41..f04f205 100755 --- a/lib/plots.py +++ b/lib/plots.py @@ -39,7 +39,7 @@ class DynamicUpdate(): #We need to draw *and* flush self.fig.canvas.draw() self.fig.canvas.flush_events() - if not step is None and step%50==0: + if not step is None and step%10==0: self.fig.savefig("tmp/{0:05d}.png".format(step),bbox_inches="tight") #Example diff --git a/main.py b/main.py index df74fe7..036a05b 100755 --- a/main.py +++ b/main.py @@ -12,12 +12,12 @@ def main(): x1 = np.array([-1, 0, 0]) x2 = np.array([1, 0, 0]) - x3 = np.array([100, 0, 0]) + x3 = np.array([100, 0, 20]) q = np.array([x1, x2, x3]) v1 = np.array([0, -0.35, 0]) v2 = np.array([0, 0.35, 0]) - v3 = np.array([0, 0, 0]) + v3 = np.array([0, 20., 0]) v = np.array([v1, v2, v3]) bodylist = [] @@ -26,14 +26,14 @@ def main(): dyn_syst = System(bodylist) dyn_syst.COMShift() - duration, step = 50, 0.01 - E, L = frogleap(duration, step, dyn_syst, recover_param=True, display=True) - fig1 = plt.figure() + duration, step = 100, 0.01 + E, L = frogleap(duration, step, dyn_syst, recover_param=True)#, display=True) + fig1 = plt.figure(figsize=(30,15)) ax1 = fig1.add_subplot(111) ax1.plot(np.arange(E.shape[0])/duration, E, label=r"$E_m$") ax1.legend() fig1.savefig("plots/Em.png",bbox_inches="tight") - fig2 = plt.figure() + fig2 = plt.figure(figsize=(30,15)) ax2 = fig2.add_subplot(111) ax2.plot(np.arange(L.shape[0])/duration, np.sum(L**2,axis=1), label=r"$L^2$") ax2.legend() diff --git a/plots/Em.png b/plots/Em.png index a2ed10c..495f36e 100644 Binary files a/plots/Em.png and b/plots/Em.png differ diff --git a/plots/L2.png b/plots/L2.png index 187c582..5417e7d 100644 Binary files a/plots/L2.png and b/plots/L2.png differ diff --git a/plots/dynsyst.gif b/plots/dynsyst.gif index fb3117d..ed1772c 100644 Binary files a/plots/dynsyst.gif and b/plots/dynsyst.gif differ