Skip to content

Instantly share code, notes, and snippets.

View quephird's full-sized avatar

danielle quephird

View GitHub Profile
(ns crossing-circles
(:use quil.core))
(def θ (atom 0))
(defn circles [sw]
(stroke-weight sw)
(doseq [i (range 1 15)]
(let [dr (* sw 2.5)
r (* i dr)]
@quephird
quephird / looking-up.clj
Last active January 4, 2016 18:09
This sketch creates a set of branches and includes a blurring effect to simulate depth of perception.
(ns looking-up
(:use quil.core quil.applet))
(def screen-w 1920)
(def screen-h 1080)
(defn leaf [l]
; unfortunately, I still need to resort to dumping down
; into Java until bug fix for bezier-vertex is released.
(ns space-dots
(:use quil.core))
(def screen-w 1000)
(def screen-h 1000)
(def phase (atom 0))
(defn- setup []
(smooth)
(ns polar-vortex
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(defn- setup []
(background 0)
(smooth)
(ellipse-mode :center)
@quephird
quephird / candy-wallpaper.clj
Last active December 31, 2015 16:49
This is a slight variation of candy.clj; this one generates a rectangular arrangement of spheres and colors them using a gradient starting from one corner to the other with some randomness thrown in.
(ns candy-wallpaper
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(def existing-spheres (atom []))
(defn- rand-color []
(vec (repeatedly 3 (fn [] (rand-int 255)))))
@quephird
quephird / candy.clj
Last active December 31, 2015 16:39
Another shameless ripoff of another person's work of art: http://cutsquash.tumblr.com/post/67785356890/candy-version
(ns candy
(:use quil.core))
(def screen-w 1000)
(def screen-h 1000)
(def existing-spheres (atom []))
(defn- rand-color []
(vec (repeatedly 3 (fn [] (rand-int 255)))))
(ns lines-of-circles
(:use quil.core))
(def screen-w 800)
(def screen-h 1000)
(defn- line-of-circles [length stroke-c fill-c]
(apply stroke stroke-c)
(apply fill fill-c)
(let [init-r (+ 75 (rand-int 50))
(ns pixercles
(:use quil.core))
(def screen-w 2000)
(def screen-h 1000)
(defn- rand-color []
(vec (repeatedly 3 (fn [] (rand-int 255)))))
(defn- vary-color [c]
(ns wobble
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(def phase (atom 0))
(defn setup []
(background 0)
@quephird
quephird / my-first-glitch.clj
Created November 18, 2013 18:04
A first attempt at making a glitch-like rendering in quil, inspired by various ones by @netgrind on Twitter
(ns my-first-glitch
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(def t (atom 0))
(defn- setup []
(background 0)