 (defn vector-add [vector1 vector2]
   (map + vector1 vector2))
 
-;; need to walk between a start and end position in a random fashion
+;; Now that we have a random direction in which to move we need to
+;; generate an unbounded path that will move in that direction, but
+;; randomise the position of each point within provided bounds.
+
+;; Firstly, we can define a function that will generate a random
+;; vector inside of lower and upper bounds that can be combined with
+;; the unrandomised position to provide a randomised path.
 
 (defn random-vector-between [lower upper]
   [(random-between lower upper)
    (random-between lower upper)
    (random-between lower upper)])
+
+;; In order to provide an unbounded path we can use a lazy sequence.
+;; This function returns a value that is somewhat akin to list that
+;; never ends. Everytime you try to look at the next value in the list
+;; it will generate one just in time for you to see no end.
+
+;; In this function the first value returned should always be the
+;; initial starting position, each following value should be a step
+;; along the path. You can see this below, it returns the position
+;; argument cons'd with another interation of random-path with the
+;; position randomised.
 
 (defn random-path [position step-vector bounds]
   (cons position

    (conj (vec random-positions) end-position)))


;; de casteljau code ripped from pollock, needs a REWRITE and a whole
;; bunch of explanation

(defn recur-relation [t a b]
  (+ (* t b) (* a (- 1 t))))

(defn fling-paint []
  (let [position       (starting-point)
        total-time     (random-between 1 5)
        path           (ensure-above-canvas (de-casteljau (control-points position 0.1 2 3 15 0.4) 0.01))
        velocities     (path-velocities path total-time)
        masses         (path-masses path (random-between 0.1 1))
        projected-path (map #(project-point %1 %2) path velocities)
