           (->>
             [         #{a d f}
              #{f e c} #{f d e} #{d b e}]
-            (mapcat #(split-face % (/ n 2)))
+            (mapcat #(split-face % r (/ n 2)))
             set))
 
         (= 0 (mod n 3))

            [                  #{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
