Skip to content

Commit

Permalink
playing with interesting inner radius cuts
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Mar 11, 2024
1 parent c91c07e commit 0d78ec0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shimmers/sketches/concentric_orbits.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
(gv/vec2 (* width x) (* height y)))

(defn max-radius [r n]
(min (/ (* r 0.99) (max 2 (Math/sqrt (+ n 3))))))
(/ r (+ Math/E (Math/sin (/ eq/TAU n)))))

(defn orbit [{:keys [p r]} n phase]
(for [t (butlast (tm/norm-range n))]
(let [radius (max-radius r n)]
(gc/circle (v/+polar p
(- r (+ radius 1.0))
(- r radius)
(+ phase (* eq/TAU t)))
radius))))

Expand Down

0 comments on commit 0d78ec0

Please sign in to comment.