 
 (defn rerender [canvas-element game-state]
     (let [
-        graphics (graphics/createGraphics 400 300)
+        graphics (graphics/createGraphics width-in-px height-in-px)
         {nodes :nodes springs :springs} game-state]
         (do
-            (apply draw-line graphics (apply concat (map world-to-screen [[0 0] [400 0]])))
+            (apply draw-line graphics (apply concat (map world-to-screen [[0 0] [width-in-px 0]])))
             (dorun (map
                 (fn [{a :node-a b :node-b}]
                     (let [

(def magnitude (comp Math/sqrt magnitude-squared))
(def normalize (comp (partial apply vec*) (juxt identity (comp (partial / 1.0) magnitude))))
(defn dot-product [v w] (apply + (map * v w)))
(defn clamp [v lower upper] (Math/min (Math/max v lower) upper))
(defn angle [v w] (Math/acos (clamp
    (dot-product (normalize v) (normalize w))
    -1.0 1.0 )))
(defn rot-cw [[x y]] [y (- x)])
(defn rot-ccw [[x y]] [(- y) x])

(defn calculate-force [node-a node-b rest-length strength]
    (let [a-b (vec- node-a node-b)

        ))

(def my-code-url "https://github.com/pauldoo/scratch/blob/master/ClojureScript/hello.cljs")
(def width-in-px 800)
(def height-in-px 300)
(def tick-step (/ 1 100))
(def render-step (/ 1 25))
(def gravity-strength 300)
(def ground-strength 100)

(defn print-to-log [v]
    (.log js/console v))
