Skip to content

Commit

Permalink
keep track of the line count per shape and adjust minimum spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Jun 17, 2024
1 parent b123b41 commit 4095241
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shimmers/sketches/density_variation.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
phase (dr/random-tau)
scale (dr/random 0.0075 0.015)]
(->> (range 0 1 0.005)
(map (fn [x] (* scale 0.5 (+ 1.0 (math/sin (+ phase (* eq/TAU rate x)))))))
(map (fn [x] (max 0.001 (* scale 0.5 (+ 1.0 (math/sin (+ phase (* eq/TAU rate x))))))))
(reductions +)
(take-while (fn [s] (<= s 1.0)))
rescale)))
Expand All @@ -52,6 +52,7 @@
(gv/vec2 d (+ 0.75 (* 0.15 n1)))]))))

(defn fill [shape pairs]
(println (count pairs))
(for [[p q] pairs]
(gl/line2 (g/unmap-point shape p)
(g/unmap-point shape q))))
Expand Down

0 comments on commit 4095241

Please sign in to comment.