(look-at-matrix-3d camera-pos target up)

Source

(defn look-at-matrix-3d [camera-pos target up] (let [z-axis (normalize (subtract-vectors camera-pos target)) x-axis (normalize (cross up z-axis)) y-axis (normalize (cross z-axis x-axis))] [(nth x-axis 0) (nth x-axis 1) (nth x-axis 2) 0 (nth y-axis 0) (nth y-axis 1) (nth y-axis 2) 0 (nth z-axis 0) (nth z-axis 1) (nth z-axis 2) 0 (nth camera-pos 0) (nth camera-pos 1) (nth camera-pos 2) 1]))