   (->>
     (map - b a)
     (map (partial * p))
-    (map + a)
-    to-unit-radius))
+    (map + a)))
 
 
-(defn split-face
+(defn- split-face
   "Splits the edges of a triangular face into n smaller segments, then pushes
-  all the new points out to the surface of a unit sphere. Returns a set of new
-  faces."
-  [face n]
+  all the new points out to the surface of a sphere with radius r. Returns a
+  set of new faces."
+  [face r n]
   (if (<= n 1)
     #{face}
     (let [[a b c] (seq face)]

            [                  #{a d i}
                      #{i j h} #{i d j} #{d e j}
             #{h g c} #{h j g} #{j f g} #{j e f} #{e f b}]
            (mapcat #(split-face % (/ n 3)))
            set))

        :else

   :c 0.41241})


(def phi
  "The golden ratio."
  (/ (+ 1 (Math/sqrt 5.0)) 2))


(def phi-angle
  "Angle formed by a 1 x phi rectangle."
  (Math/asin (/ (Math/sqrt (+ 1 (* phi phi))))))



;;;;; POINT MANIPULATION ;;;;;

(defn- map-shape
  "Takes a shape (a set of faces, each of which is a set of points, each of
  which is a vector of 3 coordinates, and applies a function to each point."
  [f shape]
  (set (map (comp set (partial map f)) shape)))


(defn- rotate-x
  "Rotates a point around the X axis."
  [theta [x y z]]
  (let [cos (Math/cos theta)
        sin (Math/sin theta)]
    [x
     (- (* y cos) (* z sin))
     (+ (* y sin) (* z cos))]))


(defn- project-radius
  "Projects a point to the same vector on the surface of the unit sphere."
  [r p]
  (let [m (Math/sqrt (apply + (map #(* % %) p)))]
    (vec (map #(/ % m) p))))



;;;;; SHAPE FUNCTIONS ;;;;;

(defn- midpoint
  "Returns a new point that is a fraction of the distance towards point b
