Skip to content

Instantly share code, notes, and snippets.

@quephird
Last active January 2, 2016 13:28
Show Gist options
  • Save quephird/8309872 to your computer and use it in GitHub Desktop.
Save quephird/8309872 to your computer and use it in GitHub Desktop.
(ns polar-vortex
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(defn- setup []
(background 0)
(smooth)
(ellipse-mode :center)
(no-loop)
)
(defn- draw []
(let [base-r 400
base-d (* base-r 2)]
(translate (* base-r 1.25) (* base-r 1.25))
(doseq [i (range 400)]
(let [b (+ 55 (rand-int 200))
g (/ b 2)
d (* base-d (Math/exp (* i -0.01)))]
(fill 0 g b)
(ellipse 0 0 d d)
)
(translate 3 1)
)
)
)
(sketch
:title "polar-vortex"
:setup setup
:draw draw
:size [screen-w screen-h]
:renderer :java2d
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment