 
 (defn attach-seeds
   [display-h {:keys [motion-seeds coral-size coral] :as state}]
-  (let [{:keys [num-row-bins cell-w]} coral-size
+  (let [{:keys [cell-w]} coral-size
         attaching (filter (fn [seed]
-                            (is-attaching? num-row-bins cell-w coral seed))
+                            (is-attaching? coral coral-size seed))
                           motion-seeds)]
     (-> state
         (update-in [:motion-seeds] #(remove-seeds % attaching))
         (update-in [:coral] #(add-seeds-to-coral cell-w % attaching)))))
 
-(def CORAL-ROT-CYCLE 120)
+(defn rotate-coral-side [{:keys [coral-size] :as state}]
+  (let [{:keys [rot-cycle]} coral-size]
+    (if (= 0 rot-cycle)
+      (update-in state [:coral]
+                 #(reduce (fn [memo [[col row :as coords]
+                                    polyp]]
+                            (if (< col 1)
+                              memo
+                              (let [new-coords [(dec col) row]]
+                                (assoc-in memo [new-coords] polyp))))
+                          {}
+                          %))
+      state)))
+
+(defn update-rot-cycle [{:keys [coral-size] :as state}]
+  (let [{:keys [rot-cycle-length]} coral-size
+        frame-count (q/frame-count)
+        rot-cycle   (mod frame-count rot-cycle-length)
+        rot-cycle2 (mod frame-count (* 2 rot-cycle-length))]
+   (update-in state [:coral-size]
+              #(-> %
+                   (assoc-in [:rot-cycle] rot-cycle)
+                   (assoc-in [:rot-cycle2] rot-cycle2)
+                   (assoc-in [:odd-col-lower]
+                             (>= rot-cycle2 rot-cycle-length))))))
 
 (defn rotate-coral [state]
-  (if (= 0 (mod (q/frame-count) CORAL-ROT-CYCLE))
-    (update-in state [:coral]
-              #(reduce (fn [memo [[col row :as coords]
-                                 polyp]]
-                         (if (< col 1)
-                           memo
-                           (let [new-coords [(dec col) row]]
-                             (assoc-in memo [new-coords] polyp))))
-                       {}
-                       %))
-    state))
+  (-> state
+      (update-rot-cycle)
+      (rotate-coral-side)))
 
 (defn draw-polyp [odd-col-lower
                   {:keys [cell-w cell-half-w

     :cell-half-w (/ cell-w 2.0)
     :hex-w hex-w
     :hex-half-w (/ hex-w 2.0)
     :hex-y-offset (hex/hex-y-offset hex-w)}))

(defn x->col [cell-w x]
  (int (/ x cell-w)))

                           1.0 0.0) (rand))))
    false))

(defn is-attaching? [coral coral-size
                     {:keys [x y color-hsva] :as seed}]
  (let [{:keys [num-row-bins cell-w odd-col-lower]} coral-size
        [col row :as coords] (xy->coords cell-w x y)]
    (and (not (is-occupied? coral coords))
         (not (is-occupied? coral [col (dec row)]))
         (or (and (is-bottom? num-row-bins row)
                  (> BOTTOM-ATTACH-PCT (rand)))
             (is-cliquey? odd-col-lower coral coords (first color-hsva)))
    )))

(defn remove-seeds [all-seeds seeds]
