Skip to content

Commit

Permalink
slow things down and a little less chaos
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Nov 18, 2024
1 parent edcc0ff commit fb58606
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/shimmers/sketches/envelope_collapse.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,22 @@
(let [t (* 0.1 t)]
(fn [x]
(let [tx (+ (* t 0.2 (eq/unit-sin (* 2 eq/TAU (+ x (* 0.9 t))))) x)
dtx (* 1.5 (math/sin (* eq/TAU (+ (* 0.5 t)
(* 2.5 (math/sin (+ (* 0.1 x) (* 2 t))) x)))))]
dtx (* 1.5 (math/sin (* eq/TAU (+ (* 0.23 t)
(* 1.75 x (math/sin (+ (* 0.1 x) (* 2 t))))))))]
(+ (* (math/sin (* 1.5 eq/TAU (+ tx dtx)))
(math/sin (* eq/TAU (+ (* 0.17 x) (* 1.1 (math/sin (- x (* 0.25 t))))
(math/sin (* eq/TAU (+ (* 0.011 x)
(* 1.1 (math/sin (- x (* 0.21 t) 1.2)))
(eq/sqr (math/sin (* eq/TAU (+ (* 0.15 t) (math/sin (* eq/TAU 0.0001 t))))))))))
(* 0.1 (math/sin (* eq/TAU (+ (* 4 x) (* 0.01 t))))))))))
(* 0.07 (math/sin (* eq/TAU (+ (* 7 x) (* 0.005 t) 2.9)))))))))

(defn draw [{:keys [t]}]
(q/background 1.0)
(q/color 0.0)
(q/stroke-weight 1.0)
(q/no-fill)
(let [offset (* 0.15 (tm/clamp (math/tan (* eq/TAU 0.1 (+ (* 0.25 t)
(* 2.1 (math/sin (+ (* eq/TAU 0.15 t) 0.75))))))
-100 100))]
(let [tan-term (+ (* 0.007 t)
(* 2.1 (math/sin (+ (* eq/TAU 0.003 t) 0.75))))
offset (* 0.15 (tm/clamp (math/tan (* eq/TAU tan-term)) -100 100))]
(doseq [v (range -2 3 1)]
(plot (graph (+ t (* v offset)))
400))))
Expand Down

0 comments on commit fb58606

Please sign in to comment.