Skip to content

Commit

Permalink
use confusion-disk in a few places that require circle import
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Nov 30, 2023
1 parent a54359a commit 8f3067b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/shimmers/sketches/grid_variations.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
[shimmers.math.probability :as p]
[shimmers.math.vector :as v]
[shimmers.sketch :as sketch :include-macros true]
[thi.ng.geom.circle :as gc]
[thi.ng.geom.core :as g]
[thi.ng.geom.line :as gl]
[thi.ng.geom.vector :as gv]
Expand All @@ -27,8 +26,7 @@
[(gl/line2 o l o h)
(gl/line2 l o h o)])))))

(defn perturb [pos radius]
(rp/sample-point-inside (gc/circle pos radius)))
(def perturb rp/confusion-disk)

(defn xy-proportional [pos]
(/ (* (:x pos) (:y pos))
Expand Down
3 changes: 1 addition & 2 deletions src/shimmers/sketches/string_lights.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
[shimmers.math.deterministic-random :as dr]
[shimmers.math.equations :as eq]
[shimmers.sketch :as sketch :include-macros true]
[thi.ng.geom.circle :as gc]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))

;; modify fill/size opacity by y-pos or time to animate?
(defn string-line [p q n r]
(for [point (repeatedly n #(tm/mix p q (dr/random)))]
{:point (rp/sample-point-inside (gc/circle point r))
{:point (rp/confusion-disk point r)
:fill [(dr/gaussian 0.125 0.03) 0.6 0.75 1.0]
:size (dr/rand-nth [8 9 10 11 12])
:rate (dr/random 0.2 0.9)}))
Expand Down

0 comments on commit 8f3067b

Please sign in to comment.