             xscale (:xscale stroke-data)
             yscale (:yscale stroke-data)
             joints (:joints stroke-data)
-            stroke-z (calc-stroke-z stroke joints)
+            dense-stroke (fill-intra-index-stroke-gap stroke)
+            stroke-z (calc-stroke-z dense-stroke joints)
             gaps (fill-inter-stroke-gap (list stroke-z))
-            dense-strokes (map fill-intra-stroke-gap (list stroke-z))
             strokes-plus-gaps (list 
                                 (process-stroke (first gaps) xscale yscale 6.0)
-                                (process-stroke (first dense-strokes) xscale yscale nil)
+                                (process-stroke stroke-z xscale yscale nil)
                                 (process-stroke (second gaps) xscale yscale 6.0))]
-        (println (map cons (iterate inc 0) (second strokes-plus-gaps)))
+        (println dense-stroke)
         (dump-angles (xyz2angles-list (reduce concat strokes-plus-gaps)))))))
 
 (defn write-strokes [angles-seq]

  (with-open [fout (io/writer "dump_degrees.h" :append true)]
    (.write fout (str (count angles-seq) "., "))
    (doseq [[a b c d] angles-seq]
      (.write fout (format "%f, %f, %f, %f, " a b c d)))))

(defn augmented-strokes-to-angles [filename]
  (defn calc-z [point left right]

;          (* ratio1 (second pt1))
;          (* ratio2 (second pt2)))))

(def intra-max-dist 4)

(defn fill-intra-stroke-gap [stroke]
  (defn append-point [stroke-arr new-tail]
    (let [dist (point-dist (last stroke-arr) new-tail)]
      (if (> dist intra-max-dist)
        (let [iter-pts (rest (concat (range 0 1 (/ intra-max-dist dist)) '(1)))
              last-pt  (last stroke-arr)] 
          (reduce (fn [arr ptv] (conj arr (mix-pts last-pt (- 1 ptv) new-tail ptv))) stroke-arr iter-pts))
        (conj stroke-arr new-tail))))
  (loop [left-stroke (rest stroke)
         last-point  (first stroke)
         reslt-stroke [last-point]]
    (if (zero? (count left-stroke))
      reslt-stroke
      (recur (rest left-stroke) (first left-stroke) (append-point reslt-stroke (first left-stroke))))))

(defn fill-intra-index-stroke-gap [stroke]
  (defn append-point [stroke-arr new-tail]
    (let [dist (point-dist (rest (last stroke-arr)) (rest new-tail))]
      (if (> dist intra-max-dist)
        (let [iter-pts (rest (concat (range 0 1 (/ intra-max-dist dist)) '(1)))
              last-pt  (last stroke-arr)] 
