Skip to content

Commit a04dbb1

Browse files
add image for scim
1 parent 5314c4c commit a04dbb1

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/mentat_collective/emmy/sicm_ch01.clj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
:quarto {:author :kloimhardt
44
:type :post
55
:date "2025-09-10"
6+
:image "sicm_ch01.png"
67
:category :libs
78
:tags [:emmy :physics]}}}
89

@@ -64,14 +65,14 @@
6465
(do
6566
(defn points->plot [paths x-axis-name y-axis-name]
6667
(let [coord-encoding (fn [coord] {:field coord :type "quantitative" :scale {:zero false}})
67-
paths-to-data (flatten
68-
(map (fn [[id data]]
69-
(map (fn [[t x y z]]
68+
paths-to-data (flatten
69+
(map (fn [[id data]]
70+
(map (fn [[t x y z]]
7071
{:id id :t t :x x :y y :z z}) data)) paths))]
7172
{:$schema "https://vega.github.io/schema/vega-lite/v2.json"
7273
:data {:values paths-to-data}
73-
:encoding
74-
{:x (coord-encoding x-axis-name)
74+
:encoding
75+
{:x (coord-encoding x-axis-name)
7576
:y (coord-encoding y-axis-name)}
7677
:layer
7778
[{:mark "line"
@@ -167,10 +168,10 @@
167168
initial-qs)]
168169
(lg/make-path t0 q0 t1 q1 minimizing-qs)))
169170

170-
(def free-path
171+
(def free-path
171172
(fnd-path (lg/L-free-particle 3.0) 0.0 1.0 pi-half 0.0 initial-qs))
172173

173-
(def harmonic-path
174+
(def harmonic-path
174175
(fnd-path (lg/L-harmonic 1.0 1.0) 0.0 1.0 pi-half 0.0 initial-qs))
175176

176177
(md "Make a plot of these one dimensional paths, this time not in the x-z plane but in the t-z plane. This shows that, upon optimization, the initial-path turns into a streight line and a sinusoidal curve respectively.")
19 KB
Loading

0 commit comments

Comments
 (0)