             :rest-length 224.0
             :strength 2000
         }
-        {
-            :node-a :u
-            :node-b :v
-            :rest-length 141.0
-            :strength 2000
-        }
+        ;{
+        ;    :node-a :u
+        ;    :node-b :v
+        ;    :rest-length 141.0
+        ;    :strength 2000
+        ;}
         {
             :node-a :t
             :node-b :v
             :rest-length 100.0
             :strength 2000
         }
-    ] })
+    ]
+    :hinges [
+        {
+            :node-a :u
+            :node-b :t
+            :node-c :v
+            :rest-angle (/ Math/PI 2)
+            :strength 100000
+        }
+    ]
+    })
 
 (defn print-to-log [v]
     (.log js/console v))

                (vec* [(- xv) (+ (Math/max 0 (- yv)) (- y))] ground-strength)
                [0 0])) (vals nodes))))

(defn calculate-all-node-forces [nodes springs]
    (merge-with vec+
        (calculate-spring-forces nodes springs)
        (calculate-gravity-forces nodes)
        (calculate-ground-forces nodes)))


(def magnitude-squared (comp (partial apply +) (partial map #(* % %))))
(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)
