Skip to content

Commit

Permalink
more tweaks and parameter sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Jul 30, 2024
1 parent ab8db6a commit a3cacfd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/shimmers/sketches/designed_imperfections.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns shimmers.sketches.designed-imperfections
(:require
[clojure.math :as math]
[shimmers.common.svg :as csvg :include-macros true]
[shimmers.common.ui.controls :as ctrl]
[shimmers.common.ui.svg :as usvg]
Expand All @@ -20,13 +21,13 @@
(defn shapes []
(let [seed (dr/noise-seed)]
(for [box (g/subdivide (csvg/screen width height)
{:cols (/ width 10) :rows (/ height 10)})]
{:cols (/ width 6) :rows (/ height 6)})]
(let [pos (g/centroid box)
n (dr/noise-at-point seed 0.015 pos)
damp (/ 1.0 (Math/pow 1.004 (g/dist pos (rv 0.5 0.5))))]
n (dr/noise-at-point seed 0.011 pos)
damp (/ 1.0 (Math/pow 1.006 (g/dist pos (rv 0.5 0.5))))]
(gc/circle (tm/+ pos
(v/polar (* 8.0 damp) (* eq/TAU n)))
(* 2.0 (+ 1.0 (* 0.5 (Math/sin (* eq/TAU n)) damp))))))))
(v/polar (* 10.0 damp) (* eq/TAU n)))
(+ 2.0 (* 0.8 damp (math/sin (* eq/TAU (- 1.0 n))))))))))

(defn scene [{:keys [scene-id]}]
(csvg/svg-timed {:id scene-id
Expand Down

0 comments on commit a3cacfd

Please sign in to comment.