Skip to content

Instantly share code, notes, and snippets.

@daveliepmann
Last active April 2, 2018 18:41
Show Gist options
  • Save daveliepmann/0c8ca4e16038478752c566b0794ccc51 to your computer and use it in GitHub Desktop.
Save daveliepmann/0c8ca4e16038478752c566b0794ccc51 to your computer and use it in GitHub Desktop.
;; 300x300 seems to be about where performance starts to degrade.
(let [i (cell (interval :frame inc))]
(cell
(apply layer
(for [x (range 0 300 20)
y (range 0 300 20)]
(let [angle (* (/ 3.14 180) (+ @i x y))]
(position (+ x (* 15 (Math/cos angle)))
(+ y (* 15 (Math/sin angle)))
(circle 7)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment