    (/ 1 6)))
 
 (defn b-spline-segment [[p1 p2 p3 p4]]
-  (m/emap
-   floor
-   (m/mmul
-    (m/matrix
-     (map (fn [t] [(* t t t) (* t t) t 1]) (range 0 1 0.01)))
-    b-spline-matrix
-    (m/matrix (list p1
-                    p2
-                    p3
-                    p4)))))
+  (get-form-points b-spline-matrix [p1 p2 p3 p4]))
 
 (defmethod line-points :spline [{points :points}]
-  (mapcat b-spline-segment  (partition 4 1 points)))
+  (linearise (mapcat b-spline-segment (partition 4 1 points))))
 
 (comment
-  (line-points {:type :spline :points [[0 0] [100 100] [200 200] [100 100]]})
-  (b-spline-segment [[0 0] [100 100] [200 200] [100 100]]))
+  (line-points {:type :spline :points [[0 0] [0 0] [100 100] [200 200] [100 100][100 100]]})
+  (doall
+   (partition 2 1 (b-spline-segment [[0 0] [100 100] [200 200] [100 100]]))))

(ns labs-4-cource.aproximation
  (:require [clojure.core.matrix :as m]
            [labs-4-cource.first-order-lines :refer [floor line-points]]))

(defn ->Ermit [p1 p2 p3 p4]
  (let [[x1 y1] p1

    [1  0  0  0]]))

(defmethod line-points :ermit [{:keys [p1 p4 v1 v4]}]
    (linearise (get-form-points ermit-matrix [p1 p4 v1 v4])))

(line-points (->Ermit [30 30] [240 300] [130 20] [200 400]))

(defn ->Bezie [p1 p2 p3 p4]
