diff --git a/political_opinion_calendar.html b/political_opinion_calendar.html
new file mode 100644
index 0000000..94cb85c
--- /dev/null
+++ b/political_opinion_calendar.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/square-law gravity - physics test.html b/square-law gravity - physics test.html
index 2a07853..211ab2f 100644
--- a/square-law gravity - physics test.html
+++ b/square-law gravity - physics test.html
@@ -56,7 +56,10 @@
i++
}
- info.innerText = "Total E_k is " + objects.map(x => 1/2 * x.m * vmag(x.v) ** 2).reduce((a, b) => a + b).toString()
+ const E_k = objects.map(x => 1/2 * x.m * vmag(x.v) ** 2).reduce((a, b) => a + b)
+ // extra division by 2 due to double-counting
+ const E_p = objects.map(o1 => objects.filter(o2 => o2 !== o1).map(o2 => 1/6 * o1.m * o2.m * G * (vmag(vsub(o1.x, o2.x)) ** 3)).reduce((a, b) => a + b)).reduce((a, b) => a + b)
+ info.innerHTML = `Ek=${E_k.toFixed(2)}
Ep=${E_p.toFixed(2)}
sum=${E_k+E_p}`
requestAnimationFrame(step)
}
diff --git a/wfc.html b/wfc.html
new file mode 100644
index 0000000..33b726d
--- /dev/null
+++ b/wfc.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
\ No newline at end of file