From 5217dcfc7a0cccbb92332c39ae7b84a572f1d422 Mon Sep 17 00:00:00 2001 From: "armindamon.riess" <armindamon.riess@uzh.ch> Date: Wed, 14 Dec 2022 10:40:40 +0100 Subject: [PATCH] also plot center of mass --- plots/animation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plots/animation.py b/plots/animation.py index d52e2d7..ad7ab85 100644 --- a/plots/animation.py +++ b/plots/animation.py @@ -20,6 +20,7 @@ def animate(i): yi = y[i*N:(i+1)*N] plt.cla() plt.scatter(xi, yi, s=0.1) + plt.scatter(np.sum(xi)/N, np.sum(yi)/N, s=1, c="red") plt.xlabel("x") plt.ylabel("y") plt.axis("equal") -- GitLab