     (if (empty? uppers)
       nil
       (reduce min (map (fn [node]
-			 ((position node) 1))
-		       uppers)))))
+                         ((position node) 1))
+                       uppers)))))
 
 (defn move-node-unchecked-to
   "Moves node to [new-x new-y]."

     (if (empty? to-process)
       visited
       (let [next (first to-process)]
	 (if (contains? visited next)
	   (recur neighbors (rest to-process) visited)
	   (let [neighs (neighbors next)]
	     (recur neighbors
		    (into (rest to-process) neighs)
		    (conj visited next))))))))

(defn all-nodes-above
  "Returns the set of all nodes above node."

(defn- create-two-halfcircles
  "Creates points for two half circles, lower circle points first."
  [x y radius]
  (let [x       (double x),
        y       (double y),
        radius  (double radius),
        samples 100,
        angle   (/ Math/PI samples),
        [upper-points, lower-points] (loop [current-angle (double (- (/ Math/PI 2.0))),
                                            acc-samples 0,
                                            upper-points [],
                                            lower-points []]
                                       (if (> acc-samples samples)
                                         [upper-points, lower-points]
                                         (let [new-x (+ x (* radius (Math/sin current-angle))),
                                               new-y (+ y (* radius (Math/cos current-angle)))]
                                           (recur (double (+ current-angle angle))
                                                  (inc acc-samples)
                                                  (conj upper-points new-x new-y)
                                                  (conj lower-points new-x (+ y y (- new-y)))))))]
    [(into-array Double/TYPE lower-points), (into-array Double/TYPE upper-points)]))

(defvar default-node-radius 5.0
