   [(double (/ (+ ax bx cx) 3))
    (double (/ (+ ay by cy) 3))
    (double (/ (+ az bz cz) 3))])
-
 
 (defn mid-point
   "Calculate the midpoint of a line"

    (let [m (double (/ (magnitude xyz) scale))]
      (if (and (not= m 0) (not= m 1))
        (divide xyz m)
        xyz))))

(defn dot-product [^doubles as ^doubles bs]
  (reduce + (mapv * as bs)))

(defn cross-product [[ax ay az] [bx by bz]]
  (point
    (- (* ay bz) (* az by))
    (- (* az bx) (* ax bz))
    (- (* ax by) (* ay bx))))

(defn transform-point [matrix]
  (fn [[ax ay az aw]]
