From fb6b8aa33cbbe0d46d858c192f43b036f8b291ab Mon Sep 17 00:00:00 2001 From: root <> Date: Thu, 24 Apr 2025 12:39:51 +0000 Subject: [PATCH 01/10] adjust constant --- sketch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sketch.js b/sketch.js index 362e59f..e89068d 100644 --- a/sketch.js +++ b/sketch.js @@ -35,7 +35,7 @@ function move_charges() { charges[i].position, charges[j].position, ); - const acceleration_mag = 1 / displacement.mag() * 0.005; + const acceleration_mag = 1 / displacement.mag() * 0.001; let ai = displacement.copy().normalize().mult(acceleration_mag); let aj = p5.Vector.mult(ai, -1); project_onto_plane(ai, charges[i].position); From 6cbdb04786b381c948abd4f6b82d802f9de373b7 Mon Sep 17 00:00:00 2001 From: root <> Date: Fri, 25 Apr 2025 08:56:49 +0000 Subject: [PATCH 02/10] move charge repelling stuff to its own file --- index.html | 1 + sketch.js | 42 +----------------------------------------- thomson-problem.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 thomson-problem.js diff --git a/index.html b/index.html index cf15339..6129f5f 100644 --- a/index.html +++ b/index.html @@ -16,6 +16,7 @@ body {