Skip to content

Instantly share code, notes, and snippets.

View quephird's full-sized avatar

danielle quephird

View GitHub Profile
@quephird
quephird / circle-gradient.clj
Created May 26, 2012 21:15
circle-gradient
(ns circle-gradient
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(def top-left-color (atom []))
(def bottom-right-color (atom []))
(defn- init-colors []
(doseq [i (range 3)]
@quephird
quephird / mondrian-factory.clj
Created May 31, 2012 20:48
mondrian-factory
(ns mondrian-factory
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(defn- red-yellow-blue-or-white []
([[255 0 0] [255 255 0] [0 0 255] [255 255 255] [255 255 255] [255 255 255]] (int (random 6))))
(defn- generate-positions-and-widths [n]
@quephird
quephird / sun-flare-thingy.clj
Created June 1, 2012 20:05
sun-flare-thingy
(ns sun-flare-thingy
(:import [processing.core PApplet PConstants])
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(defn- compute-stroke-color [x1 c1 x2 c2 x]
(map #(/ (+ %1 %2) (- x2 x1)) (map #(* (- x2 x) %) c1) (map #(* (- x x1) %) c2)))
@quephird
quephird / square-exploration.clj
Created June 5, 2012 22:39
square-exploration
(ns square-exploration
(:use quil.core))
; This is another blatant ripoff, this time of the images produced
; by Don Relyea here: http://algorithm.posterous.com/tag/algorithmicexplorationofsquares
; This code needs some serious refactoring, particularly the screen metrics.
; Stay tuned...
(def screen-w 1000)
@quephird
quephird / pleiades.clj
Created June 12, 2012 21:53
pleiades
(ns pleiades
(:import [processing.core PApplet PConstants])
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
; TODO: Need to apply blur to entire background; stars look too fake here
(defn- generate-background-stars []
(doseq [_ (range 1000)]
@quephird
quephird / clover-patch.clj
Created June 17, 2012 17:09
clover-patch
(ns clover-patch
(:import [processing.core PApplet PConstants])
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(def really-dark-brown [43 17 0])
; TODO: Need more robust set of greens
(def leaf-greens [[105 139 34] [110 139 61] [85 107 47] [79 79 47]])
@quephird
quephird / perception-of-depth.clj
Created June 20, 2012 19:59
perception-of-depth
(ns perception-of-depth
(:import [processing.core PApplet PConstants])
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(defn setup []
(smooth)
(background 0)
(ns oxalis-patch
(:import [processing.core PApplet PConstants])
(:use quil.core))
(def screen-w 1920)
(def screen-h 1080)
(def really-dark-brown [43 17 0])
(def leaf-greens [[105 139 34] [110 139 61] [85 107 47]])
@quephird
quephird / leaves-on-the-lawn.clj
Created July 7, 2012 15:59
leaves-on-the-lawn
(ns leaves-on-the-lawn
(:import [processing.core PApplet PConstants])
(:use quil.core))
(def screen-w 3840)
(def screen-h 2160)
(def really-dark-brown [43 17 0])
; TODO: Implement a means of randomly generating grassy greens
(ns mums
(:use quil.core))
; TODO: Too many magic numbers spread around the code
(def screen-w 1920)
(def screen-h 1080)
(def magenta [255 0 255])
(def orange [255 170 0])