From a77157d485db5f5349031865afe34ea3f65f70f1 Mon Sep 17 00:00:00 2001 From: Charles Comstock Date: Mon, 3 Jun 2024 17:02:54 -0500 Subject: [PATCH] add some more modulation on the curvature --- src/shimmers/sketches/stretch_curves.cljs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/shimmers/sketches/stretch_curves.cljs b/src/shimmers/sketches/stretch_curves.cljs index e6c76daa..d1655ac8 100644 --- a/src/shimmers/sketches/stretch_curves.cljs +++ b/src/shimmers/sketches/stretch_curves.cljs @@ -35,7 +35,8 @@ (let [N 256 center (cq/rel-vec 0.5 0.5) t (+ (* 2.5 time) (* 1.5 (math/sin (+ (* 0.35 time) (* 2 (math/sin (* 0.4 time))))))) - d (+ 0.05 (* 0.2 (eq/unit-sin t)))] + d (+ 0.05 (* 0.2 (eq/unit-sin t))) + d2 (+ 0.5 (* 0.4 (math/sin (+ (* 0.3 t) (math/sin (* 0.4 t))))))] (dotimes [i N] (let [a (mod (/ (- i (* 0.070 t) (* 0.15 N (math/sin (+ (* w0 i) (* 0.25 t) p0)))) (float N)) 1.0) @@ -43,8 +44,8 @@ (float N)) 1.0)) [px py] (g/point-at outline a) [qx qy] (g/point-at outline b) - [rx ry] (tm/mix center (g/point-at outline (sm/mix-mod a b d)) 0.66) - [sx sy] (tm/mix center (g/point-at outline (sm/mix-mod a b (- 1.0 d))) 0.66)] + [rx ry] (tm/mix center (g/point-at outline (sm/mix-mod a b d)) d2) + [sx sy] (tm/mix center (g/point-at outline (sm/mix-mod a b (- 1.0 d))) d2)] (q/bezier px py rx ry sx sy qx qy))))) (defn page []