Skip to content

Commit

Permalink
add x-sin-stripes striping method
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Nov 24, 2024
1 parent 99b2208 commit 7064dca
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/shimmers/sketches/cilia_phase.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
:random-normal 0.66
:stripes 1.33
:sin-stripes 1.0
:x-sin-stripes 1.0
:stair-sigmoid 2.0
:minkowski 1.33})
proportion
Expand Down Expand Up @@ -123,6 +124,9 @@
:div-prime div-prime})
:sin-stripes
{:freq (dr/random 0.66 1.33)}
:x-sin-stripes
{:freq (dr/random 0.25 16)
:amp (dr/random 0.01 0.1)}
:stair-sigmoid
{:freq (dr/random-int 2 32)
:alpha (dr/random 1.0 3.0)
Expand Down Expand Up @@ -154,9 +158,14 @@
(let [{:keys [mul-prime div-prime]} pts]
(for [x (range -0.05 1.05 (/ 1.0 density))]
(/ (mod (* x mul-prime) div-prime) div-prime)))
:sin-stripes ;; also consider (+ x (* 0.01 (sin-tau x)))
(for [x (range -0.05 1.05 (/ 1.0 density))]
(eq/unit-sin (* eq/TAU (:freq pts) x)))
:sin-stripes
(let [{:keys [freq]} pts]
(for [x (range -0.05 1.05 (/ 1.0 density))]
(eq/unit-sin (* eq/TAU freq x))))
:x-sin-stripes
(let [{:keys [freq amp]} pts]
(for [x (range -0.05 1.05 (/ 1.0 density))]
(+ x (* amp (eq/sin-tau (* freq x))))))
:stair-sigmoid
(let [{:keys [freq alpha rate amp]} pts]
(for [x (range -0.05 1.05 (/ 1.0 density))]
Expand Down

0 comments on commit 7064dca

Please sign in to comment.