Skip to content

Commit

Permalink
tweak all the rates of change
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Feb 1, 2024
1 parent f733bab commit 4b558bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shimmers/sketches/display_tree.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@
(update :t + 0.01)))

(defn fader [i x y t]
(eq/unit-sin (+ (* 0.005 x t)
(* 0.2 t)
(* 2 (eq/cube (Math/sin (+ i (* 0.005 y t))))))))
(eq/unit-sin (+ (* 0.01 x)
(* t tm/PHI)
(* 2 (eq/cube (Math/sin (+ i (* 0.01 y) (/ t tm/PHI))))))))

(defn rdraw [divisions {:keys [depth p rotation i t] :as dstate}]
(doseq [d divisions]
(if (vector? d)
(rdraw d (update dstate :depth inc))
(let [div (geometry/rotate-around d p rotation)
[dx dy] (g/centroid d)]
(q/fill (fader i dx dy (* t (/ 1 (Math/pow tm/PHI depth)))))
(q/fill (fader i dx dy (* t (/ 1 (Math/pow 1.33 depth)))))
(qdg/draw div)))))

(defn draw [{:keys [displays t]}]
Expand Down

0 comments on commit 4b558bd

Please sign in to comment.