diff --git a/README.md b/README.md index 698f4ddbfe68ef6bcad6908b12a7e0af49a4dec1..398e8f91e3d700de71cc269712bd704f851a4b6c 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ For live experience (meaning you enter the container), run: If you change code in `src`, you need to rebuild the image with `bash build/build-image.sh`. The `src` folder can also be mounted in the image, but the assumption is that life is already difficult as it is... ### interactive simulation - +In the `public` directory - Run `python -m http.server` - Go to `http://localhost:8000/public` diff --git a/public/threebody.py b/public/threebody.py index c2056c1888a725cb23032142e8c9bd6878ef4eb6..1ea1ca634949bef0a95248311e3a8bbfb178bb9e 100644 --- a/public/threebody.py +++ b/public/threebody.py @@ -102,7 +102,7 @@ def replot_canvas(): COM = np.sum(globals['m']) * (globals['m'][0] * x[0, :] + globals['m'][1] * x[1, :] + globals['m'][2] * x[2, :]) - obs = document.getElementById("angular_mom") + obs = document.getElementById("obs") s = f"L0 = {L0:.6f}Ẑ<br>L1 = {L1:.6f}Ẑ<br>L2 = {L2:.6f}Ẑ<br>L_tot = {L_tot:.6f}Ẑ<br><br>E = {E():.6f}<br> COM = {COM[0]:.6f}X̂, {COM[1]:.6f}Ŷ<br> P_tot = {P_tot[0]:.6f}X̂, {P_tot[1]:.6f}Ŷ" obs.innerHTML = s