                   (- (second pt2) (second pt1))))))
 
 (defn mix-pts [pt1 ratio1 pt2 ratio2]
- (list (+ 
-         (* ratio1 (first pt1))
-         (* ratio2 (first pt2)))
-       (+
-         (* ratio1 (second pt1))
-         (* ratio2 (second pt2)))))
+  (list (+ 
+          (* ratio1 (first pt1))
+          (* ratio2 (first pt2)))
+        (+
+          (* ratio1 (second pt1))
+          (* ratio2 (second pt2)))))
 
 (defn preprocess-stroke [stroke]
   (defn append-point [stroke-arr new-tail]

  (doseq [stroke strokes]
    (println (str "   " (doall stroke)))))

(defn -main
  "main function"
  [& args]

          strokes-z (reduce concat strokes-gaps)
          r-theta-list (map #(apply calc-r-theta %) (map (fn [x] (take 2 x)) strokes-z))
          alpha-beta-radian-list (map #(calc-alpha-beta (first %1) %2) r-theta-list (map (fn [x] (last x)) strokes-z))
          alpha-beta-degree-list (map (fn [[alpha beta]] (list (get-second-angle (radian-to-degree alpha)) (get-first-angle (radian-to-degree beta)))) alpha-beta-radian-list)
          reverse-xyz (map (fn [[alpha beta] [_ theta]] (calc-xyz alpha beta theta)) alpha-beta-degree-list r-theta-list)]
      (dump-strokes strokes "strokes")
      (dump-strokes gaps "gaps")
      (dump-strokes strokes1 "strokes after preprocess")
      (dump-strokes strokes-gaps "strokes gaps interleaved")
      (dump-strokes strokes-z "strokes-z")
      (dump-strokes alpha-beta-degree-list "alpha beta degree list")
      (dump-strokes r-theta-list "r theta list")
      (dump-strokes reverse-xyz "reverse-xyz")
      (with-open [fin (clojure.java.io/reader "resources/machine_arm.ino")
                  fout (clojure.java.io/writer "target/machine_arm.ino")]
        (doseq [line (line-seq fin)]
