import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

"""
Explanation: Links zu Dokumentationen/Tutorials für IPython/Python/numpy/matplotlib/git sowie die Sourcodes findet ihr im GitHub Repo.
End of explanation
"""


hamilton = np.loadtxt('data/ex26_euler.out')
time = hamilton[:,0]
H = hamilton[:,1]
p = hamilton[:,2]
q = hamilton[:,3]

plt.plot(time, H)
plt.show()

plt.plot(time, H)
plt.plot(time, q)
plt.plot(time, p)
plt.show()

"""
Explanation: Simplektischer Euler
End of explanation
"""


hamilton = np.loadtxt('data/ex26_expl_sv.out')
time = hamilton[:,0]
H = hamilton[:,1]
p = hamilton[:,2]
q = hamilton[:,3]

plt.plot(time, H)
plt.show()

plt.plot(time, H)
plt.plot(time, q)
plt.plot(time, p)
plt.show()

"""
Explanation: Störmer-Verlet
End of explanation
"""


