Skip to content

Instantly share code, notes, and snippets.

View quephird's full-sized avatar

danielle quephird

View GitHub Profile
@quephird
quephird / panels.clj
Created November 11, 2013 17:08
Another interpretation of a rendering by Loren Bednar: https://twitter.com/LorenBednar/status/398560087569993728/
(ns panels
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(defn- rand-color []
(repeatedly 3 (fn [] (rand-int 255))))
(defn- vary-color [base-color]
@quephird
quephird / shapes.clj
Created November 13, 2013 20:21
Another ripoff, this time from this tweet: https://twitter.com/LorenBednar/status/398901707922370560
(ns shapes
(:use quil.core))
(def screen-w 1600)
(def screen-h 800)
(defn- setup []
(background 0)
(smooth)
(no-stroke)
(ns lots-o-dots
(:use quil.core))
(def screen-w 1600)
(def screen-h 800)
(defn- setup []
(background 0)
(smooth)
(no-stroke)
@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)
(ns wobble
(:use quil.core))
(def screen-w 800)
(def screen-h 800)
(def phase (atom 0))
(defn setup []
(background 0)
(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 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))
@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)))))
@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)))))
(ns polar-vortex
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(defn- setup []
(background 0)
(smooth)
(ellipse-mode :center)